Installation
Please go through each step carefully and allow enough time. Support tickets opened due to simple errors will be forwarded to the documentation.
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
In order for your new asset to be recognized and the database changes to be applied, you must restart your server!
4. Society Accounts and other integrations
5. Your Billing System
Navigate in "sv_utils.lua" to line 151 to
RegisterServerEvent(Config.EventPrefix..":createInvoiceSociety")
and add
price = exports['gp_InsuranceSystem']:checkInsuranceCoverage(receiverPlayer.identifier, authorPlayer.getJob().name, price)
if (price == 0) then
return
end
below local note = data.note
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.
Config.InsuranceTypes = {
--[[ Basic health insurance system ]]
["ambulance"] = {
npc = {
pedModel = "s_m_m_paramedic_01",
coords = {
vector4(420.7623, -1029.6794, 29.1032, 17.1359),
},
deactivateOnMemberCount = 1,
peds = {}, -- dont touch!
},
menuLocations = {
vector3(427.6365, -1029.2020, 28.9919)
}
},
--[[ Basic vehicle membership system ]]
["mechanic"] = {
npc = {
pedModel = "s_m_m_paramedic_01",
coords = {
vector4(424.8792, -1029.4376, 29.0332, 359.9969),
},
deactivateOnMemberCount = 1,
peds = {}, -- dont touch!
},
menuLocations = {
vector3(429.4537, -1029.9272, 28.9554)
}
},
-- your new insurance/membership you like to add
["unicorn"] = {
npc = {
pedModel = "csb_stripper_01",
coords = {
vector4(130.1392, -1285.2379, 29.2755, 130.4824),
},
deactivateOnMemberCount = 1,
peds = {}, -- dont touch!
},
menuLocations = {
vector3(94.8770, -1294.7925, 29.2688)
}
},
}
Open the config.js file which is located at ./web/config.js.
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
Was this helpful?