wrenchInstallation

:


🔹 Installation

Follow these steps to install Space Economy on your server:

1️⃣ Resource Installation

  • Download the pre-packaged script. All necessary files are already included in the folder.

  • Place the space_economy folder into your server's resources directory.

  • In your server.cfg (or resources.cfg), add the following line:

ensure space_economy

⚠️ Place this line after essential dependencies like qbx_core, ox_lib, and oxmysql. 💡 Note: In the install folder, all the required scripts have already been edited. You only need to replace existing resources such as qbx_core and optionally ps-mdt / ps-dispatch for debt alerts. Everything else is pre-configured and ready to use.


2️⃣ Item Setup (Optional)

If you want to provide a tax calculator item for players:

['tax_calculator'] = {
    label = 'Tax Calculator',
    weight = 150,
    stack = false,
    close = true,
    client = {
        event = 'space_economy:client:openCalculator',
    },
}

3️⃣ Database Setup

Execute the SQL commands from sql/space_economy.sql or manually run the following:


4️⃣ Modify qbx_core

To properly calculate taxes automatically, you need to edit the RemoveMoney function in qbx_core/server/player.lua:

  • Locate the RemoveMoney function (lines ~1296–1349).

  • Replace it with the provided version that calls the export:

This ensures taxes are automatically calculated whenever money is removed from the player.

💡 Note: You do not need to replace your entire qbx_core. Only modify the RemoveMoney function as shown.


5️⃣ Optional Integration with Police

For automatic debt enforcement alerts:

  • ps-dispatch → sends alerts when debts are unpaid.

  • ps-mdt → creates warrants for unpaid debts.

Only add these integrations if your server uses them.

Last updated