Exports & Events
Exports and server events for catalytic integrations.
General Information
Vehicle arguments are network IDs. Plates are compared trimmed and case-insensitive. Missing converters are kept by plate, so a respawned vehicle with the same plate still runs rough until a converter is installed.
Types / Classes
All types / classes can be found in
types/types.luainsidezyke_catalytic.
#Complete Export Index
| Context | Exports |
|---|---|
| Server | IsConverterMissing, SetConverterMissing |
#Server Sided Exports
#Is Converter Missing
Returns whether a vehicle has no converter. Accepts a vehicle network ID or a plate string, so garage and mechanic resources can check stored vehicles. Expired records return
false.Example:
lua---@param vehicleOrPlate integer | string @ Network ID or plate ---@return boolean missing local missing = exports["zyke_catalytic"]:IsConverterMissing(vehicleOrPlate)
#Set Converter Missing
Removes or restores a vehicle's converter by network ID, updating its plate record and effects. Returns
falsewhen the network ID does not resolve to a vehicle. Use it from mechanic or garage resources.Example:
lua---@param netId integer ---@param missing boolean @ true removes the converter, false restores it ---@return boolean updated local updated = exports["zyke_catalytic"]:SetConverterMissing(netId, missing)
SetConverterMissing is a trusted server operation. It bypasses player action hooks, items, and permission checks. Do not expose it directly through an unrestricted network event.
#State Bags
| State Bag | Type | Meaning |
|---|---|---|
catalyticRemoved | boolean | true on a vehicle entity while it has no converter. |
#Server Local Events
These events are local server integration notifications. They are not network event entry points. Listen with AddEventHandler on the server. Default Discord logging for these events lives in server/unlocked/hooks.lua.
#On Converter Stolen
Fires after a converter is cut out and added to the player's inventory.
guardnames the guard cut off first, if any.Example:
lua---@param data ConverterHookData AddEventHandler("zyke_catalytic:OnConverterStolen", function(data) print(data.source, data.plate, data.model, data.size, data.guard) end)
#On Converter Installed
Fires after a replacement is installed.
sizeisuniversalfor an installed replacement.Example:
lua---@param data ConverterHookData AddEventHandler("zyke_catalytic:OnConverterInstalled", function(data) print(data.source, data.plate, data.model) end)
#On Converters Sold
Fires when converters are sold outright to a fence.
fenceIndexis the index infence.positions,soldthe number of converters,totalthe money paid, andrepthe reputation earned.Example:
lua---@param data {source: integer, fenceIndex: integer, sold: integer, total: integer, rep: integer} AddEventHandler("zyke_catalytic:OnConvertersSold", function(data) print(data.source, data.sold, data.total) end)
#On Converter Alert
Fires when a car alarm goes off or NPCs witness a cut.
typeisalarmorwitness. For dispatch, prefer editingOnConverterAlertinserver/unlocked/hooks.lua, which receives the same data.Example:
lua---@param data ConverterAlertData AddEventHandler("zyke_catalytic:OnConverterAlert", function(data) print(data.type, data.plate, data.coords) end)
#On Contract Accepted
Fires when a player takes a contract.
typeisspec,model, ortarget.Example:
lua---@param data ContractAcceptedData AddEventHandler("zyke_catalytic:OnContractAccepted", function(data) print(data.identifier, data.contractId, data.type, data.payout) end)
#On Contract Finished
Fires when a contract is handed in, runs out, is dropped, or is cancelled by an admin.
statusiscompleted,expired,abandoned, orcancelled.ratingisexcellent,good,close,poor, orwrongon hand-ins.Example:
lua---@param data ContractFinishedData AddEventHandler("zyke_catalytic:OnContractFinished", function(data) print(data.identifier, data.status, data.rating, data.payout) end)
#On Contract Reputation Changed
Fires when a player's fence reputation changes.
amountis the change andreputationthe new total.reasonis a hand-in rating,expired,abandoned,idle,sale, oradmin.Example:
lua---@param data ContractReputationData AddEventHandler("zyke_catalytic:OnContractReputationChanged", function(data) print(data.identifier, data.amount, data.reputation, data.reason) end)
#On Admin Action
Fires when an admin uses an action in the admin panel or the admin vehicle target.
targetis a character identifier, a plate, ormarket.Example:
lua---@param data ConverterAdminActionHookData AddEventHandler("zyke_catalytic:OnAdminAction", function(data) print(data.source, data.action, data.target, data.value) end)
#Client Local Events
These are local integration notifications, not server-authorized requests.
#On Player Setting Changed
Fires when the player toggles a personal setting. Receives the setting key and its new value.
Example:
lua---@param key string ---@param enabled boolean AddEventHandler("zyke_catalytic:OnPlayerSettingChanged", function(key, enabled) print(key, enabled) end)
For custom permission rules, use Can-Check Hooks.