Docs/Yecoyz MDT

Integrations

Connect your jail, billing, licence, photo and inventory scripts to Yecoyz MDT.

The connections to other scripts are in open/server.lua and open/client.lua. These files stay readable in the escrowed release, so you can point them at the scripts and tables you run.

open/server.lua

Function What it does
SearchCharacters, GetCharacter, GetNames Character lookups (ESX users, QB players)
GetPhoto(identifier) A photo for a person. Return a URL to connect an ID card or mugshot script
SearchVehicles, GetVehicle, GetVehiclesByOwner Vehicle lookups
GetLicenseTypes, GetLicenses, AddLicense, RemoveLicense Licences (esx_license or QB metadata)
SendBill(data) Used when Config.Fines.Mode = 'bill'
Jail(source, data) Sends an arrested player to your jail script. Return true when it worked
CanUseMdt(source, department, job) An extra access rule of your own
RegisterEvidenceStash(stash, label, slots, weight) Makes the evidence locker stash of a seizure (ox_inventory by default)
GetDutySeconds(identifiers, since) Seconds on duty per person, for the roster (yecoyz_duty by default)
GetItemLabel(item) The name shown for a weapon item
WatchWeapons(register) Registers every new weapon with a serial number (an ox_inventory hook by default)
GetExistingWeapons() Weapons already in players' inventories, imported once on the first start
FindWeapon(serial) Where a weapon is now: on a player, in a trunk or glovebox, or in a stash
GetProperties() Every property with owner, key holders and entrance (esx_property or qb-houses by default)

open/client.lua

Function What it does
OpenStash(stash) Opens an evidence locker in your inventory script
CanBeWitnessed(crime) Return false to skip a witness report

Example: a jail script

source is the arrested player's server id (nil when they are offline). data holds identifier, time (in Config.Sentencing.Unit), unit, charges, officerSource and arrestId.

lua
function OpenServer.Jail(source, data)
    if not source then return false end
    exports['pickle_prisons']:JailPlayer(source, data.time)
    return true
end
Stuck on this step?

Open a ticket in the Discord with what you tried and what you see, and I'll help you get it running.

Ask on Discord
Up nextExportsServer and client exports and events of Yecoyz MDT.