TogglePlayerSpectating
From SA-MP Wiki
TogglePlayerSpectating
Toggle a player's spectate mode
(playerid, toggle)
| playerid | The ID of the player who should spectate |
| toggle | 1 to enable spectating and 0 to disable |
This function does not return a specific value.
public OnPlayerDeath(playerid, killerid, reason) { TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, killerid); return 1; }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- PlayerSpectatePlayer: Spectate a player.
- PlayerSpectateVehicle: Spectate a vehicle.
