For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

1. Download

Download the latest version of the script from your keymaster account.


2. Database

Add the gp_InsuranceSystem.sql file to your database.


3. Restart your server


4. Society Accounts and other integrations

In the server/sv_customizeMe.lua file you will find countless functions that can be edited as desired.

In this file you will also find the function to add or remove money from a society account. If you do not use qb-banking or esx_addonaccount, you must integrate your corresponding system in the respective functions, AddSocietyMoney and RemoveSocietyMoney.


5. Your Billing System

When an invoice is issued, it should be checked directly whether the player has insurance and the invoice should be reduced by the corresponding amount. For this we need to add an export to your billing system.

You don't have to do anything for JakSam's Billing UI

Navigate in "sv_utils.lua" to line 151 to

and add

below local note = data.note

Navigate to "editable/server_editable.lua" to function createBilling at line 1342. Insert above jobname = society in line 1379:

So the if-statement should look like this:


6. Adding a new insurance/membership for a job

Go into the Config to the item Config.InsuranceTypes and add your new insurance/membership:

  • pedModels can be found here.

Open the config.js file which is located at ./web/config.js.

So that you can determine for each job whether it is an insurance, membership, subscription or other, you can set the most important labels and texts for the UI for each job separately.

As in the Config, you can simply copy and paste an existing translation and adjust the values. Make sure to replace the old jobname as well.

Last updated