Interface administrators, moderator
2,818
edits
PerikiyoXD (talk | contribs) m (Typo: resouce -> resource) |
No edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{ScriptItem2 | ||
| | |name = onResourceStart | ||
|side = shared | |||
|type = event | |type = event | ||
| | |games = iii vc sa iv | ||
| | |desc = a resource has started. The event is triggered after all script files have been ran in the resource's meta.xml file. | ||
|arg1 = Resource resource The resource which has started. | |||
| | |notes = This event can be used with [[bindEventHandler|bindEventHandler]].<br> | ||
The [[OnResourceReady|OnResourceReady]] is also called at the same as this event IF the resource is ready (ready = all files downloaded). | |||
|notes = This event can be used with [[bindEventHandler|bindEventHandler]]. | |cancel = true | ||
|exampleLua = addEventHandler("OnResourceStart", function(event,resource) | |exampleLua = addEventHandler("OnResourceStart", function(event,resource) | ||
outputChatBox("Resource ".. resource.name .." has started.", COLOUR_RED) | outputChatBox("Resource ".. resource.name .." has started.", COLOUR_RED) | ||
end) | end) | ||
}} | }} | ||