OnClientResourceStop: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 16: Line 16:
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( "onClientResourceStart", getRootElement( ),
addEventHandler( "onClientResourceStop", getRootElement( ),
     function ( stoppedRes )
     function ( stoppedRes )
         outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) );
         outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) );

Revision as of 11:15, 3 May 2010

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( "onClientResourceStop", getRootElement( ),
    function ( stoppedRes )
        outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) );
    end
);

See Also

Client resource events


Client event functions