OnClientResourceStop: Difference between revisions
Jump to navigation
Jump to search
m (→Source) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
==Source== | ==Source== | ||
The [[event system#Event source|source]] of this event is the | The [[event system#Event source|source]] of this event is the stopped resource [[root element]]. | ||
==Example== | ==Example== | ||
This example outputs name of resource that was started. | This example outputs name of resource that was started. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEventHandler( " | addEventHandler( "onClientResourceStop", getRootElement( ), | ||
function ( stoppedRes ) | function ( stoppedRes ) | ||
outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) ); | outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) ); |
Revision as of 04:40, 4 August 2012
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 stopped resource root element.
Example
This example outputs name of resource that was started.
addEventHandler( "onClientResourceStop", getRootElement( ), function ( stoppedRes ) outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) ); end );
See Also
Client resource events
Client event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- triggerLatentServerEvent
- triggerServerEvent
- wasEventCancelled