Jump to navigation Jump to search
- loadedResource: The resource that was loaded on the client.
The source of this event is the player who loaded the resource.
This example shows how you can trigger a custom event client-side defined in the same resource as soon as the player is ready (resource loaded on client):
addEventHandler("onPlayerResourceStart", root, function(loadedResource) outputChatBox(getResourceName(loadedResource) .. " started for " .. getPlayerName(source)) -- Trigger a custom clientside event defined in this resource if loadedResource == resource then triggerClientEvent(source, "onClientCustomEvent", resourceRoot) end end)
|Minimum server version||1.5.8-9.20957|
|Minimum client version||n/a|
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.5.8-9.20957" />