OnClientPlayerJoin: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 11: Line 11:
==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function localPlayerJoin()
function remotePlayerJoin()
outputChatBox("You've joined the server!")
outputChatBox("* " .. getPlayerName(source) .. " has joined the server")
end
end
addEventHandler("onClientPlayerJoin", getRootElement(), localPlayerJoin)
addEventHandler("onClientPlayerJoin", getRootElement(), remotePlayerJoin)
</syntaxhighlight>
</syntaxhighlight>



Revision as of 11:11, 7 March 2009