📜OSD-INSURANCES
Our new insurance script will allow you to add a fully configurable system to your city to add different types of insurance for cars, private properties, real estate, among thousands of other options... your imagination is the limit.
Our team recommends having a minimum knowledge about script programming and installation in FiveM to be able to carry out the installation of all our products. If you do not have this knowledge, we invite you to enter our Discord to request help.
📲Support & ContactINSTALLATION
Dependencies
QB-Core Framework
Ox MySql
ESX 1.0 Final or ESX Legacy Framework.
MySql Async
Ox MySql or MySql Async
SCRIPT INSTALLATION
Unzip the script file.
Put the file called "osd-insurances" into your resources folder and be sure it´s ensured in your server cfg file.
Go to osd-insurances/SHARED and excecute the file called "insert_me.sql" in the same folder you will see the items images for the insurances items.
Now go to the config.lua file and edit as your prefer.
ITEMS INSTALLATION
Insert the following items below into "qb-core/shared/items.lua".
Go to "osd-insurances/SHARED" folder and open the "inventory_image" folder copy and paste the images into your inventory images folder.
In the SHARED folder located into "osd-insurances" insert the "esx_items.sql" if you dont use weight system or "esx_items_weight.sql" if you are using weight system in your ESX Framework.
Go to "osd-insurances/SHARED" folder and open the "inventory_image" folder copy and paste the images into your inventory images folder.
In order for the metadata of the items to appear in your inventory you must add the following code (applicable for qs-inventory and qb-inventory) If you have another type of inventory please verify it yourself or open a ticket in our discord community.
QS-INVENTORY: Go to configs folder and open the metadatas.js file with a code editor.
QB-INVENTORY: Line 448 around in qb-inventory/html/js/app.js
FUNCTIONS AND API
Our system allows you to use a small api that we have added so that you can use our script and adapt it to other scripts that you want. Next we will explain and give examples of the correct use of our api.
If you wanna know what kind of insurance plan has a player you can use a function to get that information.
THIS FUNCTION CAN BE USED ONLY SERVER-SIDE NOT CLIENT-SIDE
exports['osd-insurances']:GetPlayerPlan(source)
This will help you to know the type of membership the player has, suppose you want a player to only be able to access an area if they have Diamond membership.
THIS FUNCTION CAN BE USED ONLY SERVER-SIDE NOT CLIENT-SIDE
We do not know if this will really be useful but we include it just in case. If you want to know when will be the next date that the player must pay his plan, you can do so using the following code.
THIS FUNCTION CAN BE USED ONLY SERVER-SIDE NOT CLIENT-SIDE
FOR QB-CORE USERS EXAMPLE USING QB-AMBULANCEJOB
FOR ESX USERS EXAMPLE USING ESX_AMBULANCEJOB
Last updated