OnClientPlayerJoin: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Fixed description, added source info, removed example: won't work as expected until #2570)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client event}}
{{Client event}}
This event is triggered when the local player joins a server.
This event is triggered when a [[player]] joins a server.


==Parameters==
==Parameters==
''None''
''None''
==Source==
The [[event system#Event source|source]] of this event is the [[element]] that...


==Example==
==Example==
This client side script outputs some text to the player when he joins.
[[Category:Needs Example]]
<syntaxhighlight lang="lua">
function onPlayerJoin ()                              -- When the player joins
outputChatBox("We be gangstas!", 255, 0, 0)  -- Show him some text
end
addEventHandler ( "onClientPlayerJoin", getRootElement(), onPlayerJoin )  -- add the function as an event handler
</syntaxhighlight>

Revision as of 08:09, 1 October 2007

This event is triggered when a player joins a server.

Parameters

None

Source

The source of this event is the element that...

Example