Police / MDT exports
Authorized jobs
Config.PoliceJobs defaults to police and sheriff. Set names to match your framework. RemoveDrivingLicense checks the officer's job server-side.
Check or revoke a license
local hasLicense = exports['ep-drivingschool']:HasDrivingLicense(targetSource, 'B')
local ok, removed = exports['ep-drivingschool']:RemoveDrivingLicense(officerSource, targetSource, 'B')
-- RemoveLicense is an alias with the same arguments.The target may be a valid server ID or a permanent identifier. QB/Qbox revocation rejects license: identifiers. B revokes B + BE; C revokes C + CE; other categories revoke the selected category. Theory progress is removed for revoked categories. The return is true and a category list on success, or false and a reason on failure.
Grant a license
local ok, storage = exports['ep-drivingschool']:GiveDrivingLicense(targetSource, 'B')
-- GiveLicense is an alias.A permanent identifier can also be supplied; offline grants write to the database. GiveDrivingLicense does not itself enforce a police job check; call it only from trusted server resources with your own authorization checks. Never expose it directly to clients.
Cooldowns
Config.RevokedLicenseCooldownHours and FailedExamCooldownHours both default to 0 (disabled). Set e.g. 24 for a 24-hour real-world cooldown; expiry persists through restarts. A technical refund is not a normal exam failure. Revocation still removes theory progress when the cooldown is disabled.