PlayerJoin: Difference between revisions
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
=='''Example'''== | =='''Example'''== | ||
This example outputs chat message, when player joins to the server. | This example outputs chat message, when player joins to the server. | ||
<div style="background-color: #E08283; color: #E74C3C; width: 100%; border: 2px solid #E74C3C;"> | <div style="background-color: #E08283 impotent!; color: #E74C3C; width: 100%; border: 2px solid #E74C3C;"> | ||
Server-side | Server-side | ||
</div> | </div> | ||
Revision as of 11:28, 28 December 2016
This event is triggered when a player joins the server.
Parameters
- player - player, which joined to the server.
Example
This example outputs chat message, when player joins to the server.
Server-side
function playerJoinHandler(player) {
console.log(player.name + " join.");
}
mp.events.add({
"playerJoin": playerJoinHandler
});