📜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 & Contact

INSTALLATION

Dependencies

  • QB-Core Framework

  • Ox MySql

SCRIPT INSTALLATION

  1. Unzip the script file.

  2. Put the file called "osd-insurances" into your resources folder and be sure it´s ensured in your server cfg file.

  3. 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.

  4. Now go to the config.lua file and edit as your prefer.

ITEMS INSTALLATION

  1. Insert the following items below into "qb-core/shared/items.lua".

  2. Go to "osd-insurances/SHARED" folder and open the "inventory_image" folder copy and paste the images into your inventory images folder.

['health_insurance']				 = {['name'] = 'health_insurance',					['label'] = 'Health Insurance Papers',				['weight'] = 0,			['type'] = 'item',		['image'] = 'health_insurance.png',		['unique'] = true,		['useable'] = true,		['shouldClose'] = false,	['combinable'] = nil,	['description'] = 'Vehicle insurance paper'},
['car_insurance']				 = {['name'] = 'car_insurance',					['label'] = 'Car Insurance Papers',				['weight'] = 0,			['type'] = 'item',		['image'] = 'car_insurance.png',		['unique'] = true,		['useable'] = true,		['shouldClose'] = false,	['combinable'] = nil,	['description'] = 'Vehicle insurance paper'},
['house_insurance']				 = {['name'] = 'house_insurance',					['label'] = 'House Insurance Papers',				['weight'] = 0,			['type'] = 'item',		['image'] = 'house_insurance.png',		['unique'] = true,		['useable'] = true,		['shouldClose'] = false,	['combinable'] = nil,	['description'] = 'Vehicle insurance paper'},

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)

EXAMPLE:

local source = source
local player_plan = exports['osd-insurances']:GetPlayerPlan(source)

if player_plan == 'Vehicle' then
    -- add your code here
end

Last updated