📥Exports

Configuration guide of Driving School.

Client Exports


chevron-righthasLicensehashtag
local hasB = exports['stg-drivingschool']:hasLicense('drive_b')

if hasB then
    print("he have!")
else
    print("he haven't")
end

Returns whether the player has the specified license or not as true or false.

chevron-rightaddLicensehashtag
local addLicense = exports['stg-drivingschool']:addLicense(licenseName)

if addLicense then
    print("added license!")
else
    print("he already have this license.")
end

Adds a license to the local player. Returns true if added successfully, false if player already has it.

chevron-rightremoveLicensehashtag
local addLicense = exports['stg-drivingschool']:removeLicense(licenseName)

if addLicense then
    print("Removed license!")
else
    print("he already dont have this license.")
end

Removes a license from the local player. Returns true if removed successfully, false if player doesn't have it.

Server Exports


chevron-righthasLicensehashtag
local hasB = exports['stg-drivingschool']:hasLicense(source, 'drive_b')

if hasB then
    print("he have!")
else
    print("he haven't")
end

Returns whether the player has the specified license or not as true or false.

chevron-rightaddLicensehashtag

Adds a license to the player. Returns true if added successfully, false if player already has it.

chevron-rightremoveLicensehashtag

Removes a license from the player. Returns true if removed successfully, false if player doesn't have it.

Last updated