OnPlayerJoined: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = server
|name = OnPlayerJoined
|side = server
|type = event
|type = event
|name = OnPlayerJoined
|games = iii vc sa iv
|usage = a player has connected to the server
|desc = a player has connected to the server
|callbackParameters = Event event, Client client
|arg1 = Client client The client that has connected to the server.
|cancellable = false
|note = The chronological order of player connection events are:<br>
|parameter1 = Client client The client that has connected to the server.
|notes =  
The chronological order of player connection events are:<br>
[[OnPlayerConnect|OnPlayerConnect]]<br>
[[OnPlayerConnect|OnPlayerConnect]]<br>
[[OnPlayerJoin|OnPlayerJoin]]<br>
[[OnPlayerJoin|OnPlayerJoin]]<br>
[[OnPlayerJoined|OnPlayerJoined]]
[[OnPlayerJoined|OnPlayerJoined]]
|exampleJS =  
|cancel = false
addEventHandler('OnPlayerJoined', (event, client) => {
|exampleJS = addEventHandler('OnPlayerJoined', (event, client) => {
messageClient(`Hello ${client.name}, welcome to my server! 👋`, client, COLOUR_YELLOW);
messageClient(`Hello ${client.name}, welcome to my server! 👋`, client, COLOUR_YELLOW);
});
});
|exampleLua =  
|exampleLua = addEventHandler('OnPlayerJoined', function(event, client)
addEventHandler('OnPlayerJoined', function(event, client)
messageClient('Hello ' .. client.name .. ', welcome to my server! 👋', client, COLOUR_YELLOW)
messageClient('Hello ' .. client.name .. ', welcome to my server! 👋', client, COLOUR_YELLOW)
end)
end)
}}
}}
6,834

edits

Navigation menu