PlayerJoin: Difference between revisions
No edit summary |
No edit summary |
||
| Line 15: | Line 15: | ||
<tr> | <tr> | ||
<td> | <td> | ||
<syntaxhighlight lang="javascript"> | </td> | ||
</tr> | |||
</tbody> | |||
</table> | |||
<syntaxhighlight lang="javascript"> | |||
function playerJoinHandler(player) { | function playerJoinHandler(player) { | ||
console.log(player.name + " join."); | console.log(player.name + " join."); | ||
| Line 25: | Line 30: | ||
}); | }); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 22:02, 27 December 2016
This event is triggered when a player joins the server.
Parameters
- player - player, which joined to the server.
Example
<thead> </thead> <tbody> </tbody>| Server-side |
|---|
function playerJoinHandler(player) {
console.log(player.name + " join.");
}
mp.events.add({
"playerJoin": playerJoinHandler
});