OnClientResourceStop: Difference between revisions
Jump to navigation
Jump to search
m (See Also for client resource events) |
|||
Line 14: | Line 14: | ||
==Example== | ==Example== | ||
This example outputs name of resource that was started. | |||
<syntaxhighlight lang="lua"> | |||
addEventHandler( "onClientResourceStart", getRootElement( ), | |||
function ( stoppedRes ) | |||
outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) ); | |||
end | |||
); | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== |
Revision as of 18:53, 5 October 2009
This event is triggered when a resource is stopped.
Parameters
resource stoppedResource
- stoppedResource: the resource that was stopped.
Source
The source of this event is the client root element.
Example
This example outputs name of resource that was started.
addEventHandler( "onClientResourceStart", getRootElement( ), function ( stoppedRes ) outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) ); end );
See Also
Client resource events
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled