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...")
 
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 13: Line 13:
});
});
</syntaxhighlight>
</syntaxhighlight>
==See Also==
{{Player_block}}
[[Category:Player API]]
[[Category:Server-side Function]]

Latest revision as of 17:04, 17 May 2019

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