gpScripts Docs
StoreDiscordYoutube
  • 📔gpScripts
  • Clothingshop
    • Installation
    • Developers
      • Client
  • 💰InsuranceSystem
    • Installation
    • Developers
      • Client
      • Server
  • 📲Businesscards
    • Installation
    • Developers
      • Events
  • 🛡️visumsystem
    • Installation
    • Developers
      • Commands
      • Exports
      • Events
    • Code Snippets
      • QB-Garages
  • ☎️Emergencyphone
    • Installation
    • Common mistakes
      • Common mistakes
    • Developer
      • Events
  • 💵Tax-System
    • Installation
      • Step 1 - SQL-File
      • Step 2 - [QB-Core] Changes
      • Step 3 - [ESX] Changes
      • Step 4 - Restart your server
      • Step 5 - Set first deduction date
    • Exclude inactive vehicles
    • Common mistakes
      • Common mistakes
    • Developer
      • Events
Powered by GitBook
On this page

Was this helpful?

  1. InsuranceSystem
  2. Developers

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:

variable
description

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)
variable
description

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)
variable
description

methode

"fix" or "member"

coverage

coverage

price

price

paymentInterval

payment interval

startingPrice

startingprice

cancelPrice

cancelprice

PreviousClientNextInstallation

Last updated 6 months ago

Was this helpful?

💰