Server
Here you can find all server events and exports you can use.
Exports
GetInsuredPlayers - Returns all insured players of the job
-- @param job: insurance job to get insured players from
exports['gp_InsuranceSystem']:GetInsuredPlayers(job)
-- example usage
local Players = exports['gp_InsuranceSystem_ESX']:GetInsuredPlayers('ambulance')
for identifier,playerData in pairs(Players) do
print("Identifier: " .. identifier ..
"\nPlan: " .. playerData.plan ..
"\nPlayername: " .. playerData.playername ..
"\nStartDate: " .. playerData.startDate ..
"\nNextPaymentDate: " .. playerData.nextPaymentDate)
end
Variables for the playerData for each player:
plan
Plan name of the insurance/membership
playername
Name of the player
startDate
Start date of the insurance/membership
nextPaymentDate
Next payment date of the insurance/membership
GetPlanDetails - Returns the insurance/membership details of the player
You only need source or identifier! Input nil for the other parameter.
-- @param source: source of the player
-- @param identifier: identifier of the player (citizenid for QB)
-- @param insurance: insurance job
exports['gp_InsuranceSystem']:GetPlanDetails(source, identifier, insurance)
label
Insurance/Membership plan name
coverage
coverage of the plan
price
price of the plan
paymentInterval
payment interval of the plan
startingPrice
startingprice of the plan
cancelPrice
cancelprice of the plan
GetPrivateInsuranceCoverage - Returns the insurance/membership coverage of the player
You only need source or identifier! Input nil for the other parameter.
-- @param source: source of the player
-- @param identifier: identifier of the player (citizenid for QB)
-- @param insurance: insurance job
exports['gp_InsuranceSystem']:GetPrivateInsuranceCoverage(source, identifier, insurance)
GetPlayerBusinessInsuranceCoverage - Returns coverage of the players business insurance/membership
You only need source or identifier! Input nil for the other parameter.
-- @param source: source of the player
-- @param identifier: identifier of the player (citizenid for QB)
-- @param insurance: insurance job
exports['gp_InsuranceSystem']:GetPlayerBusinessInsuranceCoverage(source, identifier, insurance)
GetBusinessInsuranceDetails - Returns insurance/membership contitions of the business
-- @param business: business name to get conditions
-- @param insurance: insurance job
exports['gp_InsuranceSystem']:GetBusinessInsuranceDetails(business, insurance)
methode
"fix" or "member"
coverage
coverage
price
price
paymentInterval
payment interval
startingPrice
startingprice
cancelPrice
cancelprice
Last updated
Was this helpful?