From SA-MP Wiki

Jump to: navigation, search


(Re)Spawns a player.

playeridThe ID of the player to spawn.

Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. This means the player is not connected.



  • Kills the player if they are in a vehicle and then they spawn with a bottle in their hand.
  • If a player is in spectate mode and you want to spawn them, use TogglePlayerSpectating instead.

Otherwise they won't be spawned and instead will show the player flying mid-air

Example Usage:

if (strcmp(cmdtext, "/spawn", true) == 0)
    return 1;

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools