-
Notifications
You must be signed in to change notification settings - Fork 2
Native Server API ‐ Events
Jonas Söderberg edited this page Jul 13, 2024
·
5 revisions
Before defining any event handler function, you should store any existing reference and make sure you call it first thing in your function. Otherwise, other addons depending on said event will break!
local _oldOnCustomGameData = OnCustomGameData
OnCustomGameData = function(typeId, id, prev, cur)
if _oldOnCustomGameData then _oldOnCustomGameData(typeId, id, prev, cur) end
-- Your code here
end
OnCustomGameData(int: typeId, int: id, float: prev, float: cur) -> ?
Called at the start of sending data to the client
OnCustomGameDataFinish() -> ?
Called after the transaction is finished and all data is available
OnCustomGameInit() -> ?
Called after initializing the custom data the first time, for example after login