OnPlayerJoined: Difference between revisions

no edit summary
(Since the event doesn't exist client-side, I made it server-side only. I also added an example)
No edit summary
Line 7: Line 7:
|cancellable = false
|cancellable = false
|parameter1 = Client client The client that has connected to the server.
|parameter1 = Client client The client that has connected to the server.
|notes = {{Shared/PlayerConnectionEvents}}
|notes =  
The chronological order of player connection events are:<br>
[[OnPlayerConnect|OnPlayerConnect]]<br>
[[OnPlayerJoin|OnPlayerJoin]]<br>
[[OnPlayerJoined|OnPlayerJoined]]
|exampleJSSS =  
|exampleJSSS =  
addEventHandler('OnPlayerJoined', (event, client) => {
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);
});
});
|exampleLuaSS =
addEventHandler('OnPlayerJoined', function(event, client)
messageClient('Hello ' .. client.name .. ', welcome to my server! 👋', client, COLOUR_YELLOW)
end)
}}
}}
21

edits