PlayerJoin

From RAGE Multiplayer Wiki
Revision as of 19:33, 23 August 2018 by TedJr (talk | contribs)
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!`);
});