πŸ’» Installation

How to set up the script?

🧱 Dependencies

To ensure the OS and physical paper systems work seamlessly, the following resources are required:

  • Ox Lib: Core library for UI and internal functions.

  • OX Inventory or QB Inventory: For item management and persistence.

  • OxMySQL: For database connectivity.


πŸ“¦ Inventory Configuration

Choose your framework and add the following items to your shared files.

Option A: OX Inventory (data/items.lua)

['laptop'] = {
    label = 'Laptop',
    weight = 2000,
    stack = true,
    close = true,
    description = 'Place it in the world to use it',
    client = { export = 'df_computer.useLaptop' }
},
['desktop_computer'] = {
    label = 'Desktop Computer',
    weight = 6000,
    stack = true,
    close = true,
    description = 'Fixed computer - place it in the world',
    client = { export = 'df_computer.usedesktopComputer' }
},
['printer'] = {
    label = 'Printer',
    weight = 5000,
    stack = true,
    close = true,
    description = 'Place a printer in the world',
    client = { export = 'df_computer.usePrinter' }
},
['usb'] = {
    label = 'USB',
    weight = 20,
    stack = false,
    close = true,
    description = 'USB Drive - use it with a computer'
},
['paper'] = {
    label = "Paper",
    weight = 50,
    stack = false,
    close = true,
},
['pencil'] = {
    label = "Pen",
    weight = 100,
},

Custom Inventory Note: Use TriggerEvent("df:vedidoc", serial, slot) on item "paper" to view documents.

Option B: QB Core (shared/items.lua)


πŸ—„οΈ Database Setup (SQL)

Execute the following queries in your database to handle file persistence, emails, and device tracking:


βš™οΈ Final Steps

  • Step 1: Place the df_computer folder into your resources directory.

  • Step 2: Add ensure df_computer to your server.cfg (ensure it starts after dependencies).

  • Step 3: Review config.lua to adjust settings like language, prop names, and permissions.

Last updated