🔁Server-Exports
Check if a Vehicle has Insurance
Export:
HasCarInsurance(plate, cb)
Description: Checks if a vehicle with the given plate has insurance.
Usage:
exports['m-Insurance']:HasCarInsurance('ABC123', function(hasInsurance)
if hasInsurance then
print("Vehicle is insured")
else
print("Vehicle is not insured")
end
end)
Check if a Vehicle has Registration
Export:
HasCarRegistration(plate, cb)
Description: Checks if a vehicle with the given plate has registration.
Usage:
exports['m-Insurance']:HasCarRegistration('ABC123', function(hasRegistration)
if hasRegistration then
print("Vehicle is registered")
else
print("Vehicle is not registered")
end
end)
Check if a Player has Health Insurance
Export:
HasHealthInsurance(identifier, cb)
Description: Checks if the player with the given citizenid has health insurance.
Detail: Identifier must be citizenID
Usage:
exports['m-Insurance']:HasHealthInsurance('playerID123', function(hasInsurance)
if hasInsurance then
print("Player has health insurance")
else
print("Player does not have health insurance")
end
end)
Check if a Player has Home Insurance
Export:
HaveHomeInsurance(identifier, cb)
Description: Checks if the player with the given citizenid has home insurance.
Detail: Identifier must be citizenID
Usage:
exports['m-Insurance']:HaveHomeInsurance('playerID123', function(hasInsurance)
if hasInsurance then
print("Player has home insurance")
else
print("Player does not have home insurance")
end
end)
Get Insurance Data for a Player or Vehicle
Export:
GetInsuranceData(insuranceType, identifier, cb)
Description: Retrieves the insurance data based on the insurance type (
vehicles
,health
, orhome
).Usage:
exports['m-Insurance']:GetInsuranceData('vehicles', 'ABC123', function(data)
if data then
print("Insurance Data: ", data)
else
print("No insurance data found")
end
end)
Check if a Vehicle have Documents Suspended
Export:
HasDocumentsSuspended(plate, cb)
Description: Grants vehicle insurance to a player for the specified plate and model with an expiration date.
Usage:
exports['m-Insurance']:HasDocumentsSuspended('ABC123', function(hasDocumentSuspended)
if hasDocumentSuspended then
print("The plate has the documents suspended!")
else
print("The plate dosen't have the documents suspended!")
end
end)
Give Vehicle Insurance
Export:
GiveCarInsurance(src, plate, model, expire_months, identifier, owner_name)
Description: Grants vehicle insurance to a player for the specified plate and model with an expiration date.
Usage:
exports['m-Insurance']:GiveCarInsurance(src, 'ABC123', 'CarModel', 1, 'playerID123', 'OwnerName')
Give Vehicle Registration
Export:
GiveCarRegistration(src, plate, model, expire_months, identifier)
Description: Grants vehicle registration to a player for the specified plate and model with an expiration date.
Usage:
exports['m-Insurance']:GiveCarRegistration(src, 'ABC123', 'CarModel', 1, 'playerID123')
Give Health Insurance
Export:
GiveHealthInsurance(src, identifier, expire_months, owner_name)
Description: Grants health insurance to a player for the specified identifier with an expiration date.
Usage:
exports['m-Insurance']:GiveHealthInsurance(src, 'playerID123', 1, 'OwnerName')
Give Home Insurance
Export:
GiveHomeInsurance(src, identifier, expire_months, owner_name)
Description: Grants home insurance to a player for the specified identifier with an expiration date.
Usage:
exports['m-Insurance']:GiveHomeInsurance(playerID, 'playerID123', 1, 'OwnerName')
Remove Vehicle Insurance
Export:
RemoveCarInsurance(plate)
Description: Removes insurance for the vehicle with the given plate.
Usage:
exports['m-Insurance']:RemoveCarInsurance('ABC123')
Remove Vehicle Registration
Export:
RemoveCarRegistration(plate)
Description: Removes registration for the vehicle with the given plate.
Usage:
exports['m-Insurance']:RemoveCarRegistration('ABC123')
Remove Health Insurance
Export:
RemoveHealthInsurance(identifier)
Description: Removes health insurance for the player with the given identifier.
Usage:
exports['m-Insurance']:RemoveHealthInsurance('playerID123')
Remove Home Insurance
Export:
RemoveHomeInsurance(identifier)
Description: Removes home insurance for the player with the given identifier.
Usage:
exports['m-Insurance']:RemoveHomeInsurance('playerID123')
Last updated