TogglePlayerSpectating

From SA-MP Wiki

Jump to: navigation, search

TogglePlayerSpectating


Toggle a player's spectate mode


Parameters:
(playerid, toggle)
playeridThe ID of the player who should spectate
toggle1 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.

Personal tools