Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.revoscripts.com/llms.txt

Use this file to discover all available pages before exploring further.

All exports are server-side only and cannot be called from client-side scripts.

Export List

exports['revo_idcard']:CreateCard(source, cardType, deductMoney)
exports['revo_idcard']:GetPurchasableCards()

CreateCard

Generic export for any card key inside Config.Cards.
exports['revo_idcard']:CreateCard(source, 'id_card')
exports['revo_idcard']:CreateCard(source, 'bike_license')
exports['revo_idcard']:CreateCard(source, 'hunting_license', false)
Parameters:
  • source (number): Player server ID
  • cardType (string): Card key from Config.Cards
  • deductMoney (boolean, optional): Defaults to true
Behavior:
  • Returns true if the request was accepted
  • Returns false if the card key is invalid or disabled
  • true charges the player normally
  • false issues the card without charging

GetPurchasableCards

Returns the currently enabled and purchasable cards from config.
local cards = exports['revo_idcard']:GetPurchasableCards()

for i = 1, #cards do
    print(cards[i].type, cards[i].name, cards[i].design, cards[i].cost)
end
Returned fields per card:
  • type
  • name
  • design
  • cost

Example Usage

Charge player normally:
exports['revo_idcard']:CreateCard(source, 'id_card')
Issue a custom card without charging:
exports['revo_idcard']:CreateCard(source, 'bike_license', false)
Issue default ID without charging:
exports['revo_idcard']:CreateCard(source, 'id_card', false)
Get menu-eligible cards:
local cards = exports['revo_idcard']:GetPurchasableCards()

How Exports Work

These exports trigger mugshot capture first, then create the card through the normal script flow. Complete flow when you call a creation export:
  1. Export called -> Triggers revo_idcard:requestMugshotAndCreateID client event
  2. Client-side -> Handles mugshot capture and sends data back via revo_idcard:receiveMugshotAndCreateID
  3. Server-side -> Receives mugshot data and triggers revo_idcard:issueRealID event
  4. Final creation -> issueRealID handles player data fetching and actual item creation
Creation exports are fire-and-forget. They start the process immediately, while success or failure is handled through the script’s normal internal flow.

Important Notes

  • cardType must exist in Config.Cards
  • Disabled cards return false and will not be issued
  • Custom cards also need matching inventory item definitions
  • CreateCard replaces the need to document per-card wrapper exports
  • The player must have enough inventory space for the card to be created
  • Money deduction is optional and defaults to enabled
  • These exports work with all supported inventory systems: ox_inventory, qb-inventory, qs-inventory, and qs-advancedinventory