Licences
Licences
A licence gates what a player may buy or do.
Config.Licences = { … }
How gating works
A shop line can require a licence. Without it the tile is visible but refuses — the player can see that a weapons licence exists and what it would let them buy, which is more useful than hiding the line entirely.
Granting and revoking
invlicence <playerId> grant <name>
invlicence <playerId> revoke <name>
Revocation is framework-aware, because the frameworks disagree about what "revoked" means:
| Framework | Revoke does |
|---|---|
| QBCore | Sets the licence to false — the record stays, the permission goes |
| ESX | Deletes the row |
| Standalone | Takes the licence item through the inventory engine |
That last one matters: in standalone mode a licence is a physical card in the bag, so revoking it is a normal item removal and appears in the ledger like anything else.
invlicencetest self-test