PlayerJoin
Shared
This event is triggered when a player joins the server.
NOTE: This event is not called for the local player who joined the server (when it's used in client-side).
Syntax
mp.events.add('playerJoin', player => {
//do stuff here
});
Attributes
- player: The player who joined.
Examples
This is a basic explanation about what does the example below do.
mp.events.add('playerJoin', player => {
mp.gui.chat.push(`[SERVER]: ${player.name} has joined the server!`);
});