EXPORT INTEGRATION
To use this license script with any AutoSchool, Boat School system or script that you want to grant the license, you have to add the following export:
-- @param identifier - player identifier
-- @param type - license type ( driving, weapon or any other valid license from the config )
-- @param vehicletype - vehicle type ( none, car, truck, motorcycle, boat, plane, helicopter )
exports['Buty-license']:AddLicense('identifier', 'type', 'vehicletype')
identifier - player identifier
type - license type ( driving, weapon or any other valid license from the config )
vehicletype - vehicle type ( none (in case it is not a driver's license.), car, truck, motorcycle, boat, plane, helicopter )
To delete any license, whether it's for a police system or whatever, you should add this export:
-- @param identifier - player identifier
-- @param type - license type ( driving, weapon or any other valid license from the config )
-- @param vehicletype - vehicle type ( none, car, truck, motorcycle, boat, plane, helicopter )
exports['Buty-license']:RemoveLicense('identifier', 'type', 'vehicletype')
identifier - player identifier
type - license type ( driving, weapon or any other valid license from the config )
vehicletype - vehicle type ( none (in case it is not a driver's license.), car, truck, motorcycle, boat, plane, helicopter )
The following export is used to detect if a player has the license or not. For example, for a gun store to open only if you have a gun license, etc. You must add this export in the script you want.
exports['Buty-license']:CheckLicense("type", "vehicletype", function(result)
if result then
-- Here you will add the script function. What you want it to do if you DO have the licenses.
print("Has the license.")
else
-- Here you will add the script function. What you want it to do if you do NOT have the licenses.
print("Doesn't have the license.")
end
end)
vehicletype - vehicle type ( none (in case it is not a driver's license.), car, truck, motorcycle, boat, plane, helicopter )
type - license type ( driving, weapon or any other valid license from the config )
Last updated