Player::spawn: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "This function spawn a player. == Syntax == <syntaxhighlight lang="javascript"> player.spawn(Vector3 position) </syntaxhighlight> == Example == This example spawns the player...")
 
No edit summary
Line 13: Line 13:
});
});
</syntaxhighlight>
</syntaxhighlight>
==See Also==
{{Player_block}}

Revision as of 13:41, 17 April 2017

This function spawn a player.

Syntax

player.spawn(Vector3 position)

Example

This example spawns the player after connect.

mp.events.add('playerJoin', player => {
  player.model = mp.joaat('player_zero');
  player.spawn(new mp.Vector3(-425.517, 1123.620, 325.8544));
});

See Also