Exports

This page explains the available Driving School exports and how to use them properly in your scripts or commands.

⚠️ Warning: These exports are server-side only and will not work on the client side.


Get License Data

  • Purpose: Retrieve all license information of a player (e.g., vehicle, plane, truck, etc.) by their character ID.

  • Parameters:

    • licenseType (string): License category (e.g., "practical", "theory").

    • Server ID (number): Player's Server ID.

    • callback (function): Receives license info when available.

  • Example:

exports["nproblem-drivingSchool"]:getPlayerLicenseData("practical", 1, function(license)
    if licenses then
        print("Player license data:")
        print(json.encode(license))
        
        if license.vehicle then
            print("Player has a vehicle license.")
        else
            print("Player doesn't have a vehicle license.")
        end
    else
        print("No license data found.")
    end
end)

Remove License

  • Purpose: Remove a specific license from a player.

  • Parameters:

    • licenseType (string): License type to remove.

    • Server ID (number): Player's Server ID.

  • Example:


Add License

  • Purpose: Add a license to a player.

  • Parameters:

    • licenseType (string): License type to add.

    • Server ID (number): Player's Server ID.

  • Example:


Use these exports to manage licenses in your custom scripts or commands easily.

Last updated