OnPlayerRequestSpawn

From SA-MP Wiki

Jump to: navigation, search


Called when a player attempts to spawn via class selection.


Parameters:
(playerid)
playeridThe ID of the player who requested to spawn.


ReturnsReturning 0 in this callback will prevent the player from spawning


public OnPlayerRequestSpawn(playerid)
{
    if(!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_GREEN,"You may not spawn.");
        return 0;
    }
    return 1;
}

Related Callbacks

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

Personal tools