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 a player’s license information by type and 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 license then
        print("License found:", license)
    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:

exports['nproblem-drivingSchool']:removePlayerLicense("vehicle", 1)

Add License

  • Purpose: Add a license to a player.

  • Parameters:

    • licenseType (string): License type to add.

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

  • Example:

exports['nproblem-drivingSchool']:addPlayerLicense("motorcycle", 1)

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

Last updated