OnClientResourceStop: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:Incomplete Event]]
{{Client event}}
 
__NOTOC__  
__NOTOC__  
This event is blahblah and is used for blahblah.
This event is triggered when a [[resource]] is stopped.


==Syntax==  
==Parameters==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
void onClientResourceStop ( string name )
resource stoppedResource
</syntaxhighlight>  
</syntaxhighlight>
 
*'''stoppedResource''': the [[resource]] that was stopped.
 
==Source==
The [[event system#Event source|source]] of this event is the stopped resource [[root element]].


==Example==  
==Example==  
This example does...
This example outputs name of resource that was started.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
addEventHandler( "onClientResourceStop", getRootElement( ),
blabhalbalhb --abababa
    function ( stoppedRes )
--This line does this...
        outputChatBox( "Resource stopped: " .. getResourceName( stoppedRes ) );
mooo
    end
);
</syntaxhighlight>
</syntaxhighlight>
==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