Driving School Job Developers & Integration

1 min read

Developers & Integration

Licenses issued here are meant to be usable by the rest of your server. The script exposes server exports any resource can call, plus police revocation and an optional mirror into your framework's own license store.

License exports

Call these from any server script to ask about a player's licenses:

ExportReturns
HasLicence(src, category)whether the player holds a given license category
GetLicences(src)the player's licenses (with categories and expiry)
CategoryForVehicle(vehicleClass)the license category a vehicle class requires
IsLicensedToDrive(src, vehicleClass)whether the player is licensed to drive that vehicle class

IsLicensedToDrive is the one most scripts want: gate a vehicle, a rental, or a job at the point of use, and unlicensed drivers can be flagged to police.

Police integration

  • /dmvrevoke and /dmvchecklicence are police commands, gated to a configurable police job.
  • A partner police script can revoke a license by firing the dmv:licenses:revoke net event.
  • An optional, off-by-default one-way mirror writes into a framework license store, so existing police scripts that read the framework's own licenses keep working untouched. It is a mirror, so the script's records remain the source of truth.

Licenses carry per-category expiry, so a server can require renewals and a police script can treat an expired license accordingly.

Companion resource

The reception and exam dialogue runs through vs-npc-dialogue exports, so keep it updated in lockstep with the script. See its docs.

Building an integration and want an export or event that is not listed here? Open a ticket on Discord and we will point you at the right seam.