OnClientResourceStop: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(6 intermediate revisions by 6 users not shown)
Line 11: Line 11:


==Source==
==Source==
The [[event system#Event source|source]] of this event is the client [[root element]].
The [[event system#Event source|source]] of this event is the stopped resource [[root element]].


==Example==  
==Example==  
[[Category:Needs example]]
This example outputs name of resource that was started.
<syntaxhighlight lang="lua">
addEventHandler( "onClientResourceStop", getRootElement( ),
    function ( stoppedRes )
        outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) );
    end
);
</syntaxhighlight>


[[Category:Incomplete Event]]
==See Also==
===Client resource events===
{{Client_resource_events}}
===Client event functions===
{{Client_event_functions}}

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