Player::name: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "This property is the name of a player. ==Example== <source lang="javascript"> mp.events.add( { "playerJoin" : player => { console.log("Player name: " + playe...")
 
No edit summary
Line 3: Line 3:
==Example==
==Example==
<source lang="javascript">
<source lang="javascript">
mp.events.add(
let playerName = player.name
{
player.name = 'Bobby'
    "playerJoin" : player =>
    {
        console.log("Player name: " + player.name);
        player.name = "_" + player.name;
    }
});
</source>
</source>

Revision as of 19:13, 4 January 2017

This property is the name of a player.

Example

let playerName = player.name
player.name = 'Bobby'