OnPlayerRequestSpawn
From SA-MP Wiki
Called when a player attempts to spawn via class selection.
(playerid)
| playerid | The ID of the player who requested to spawn. |
| Returns | Returning 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.
- OnPlayerRequestClass: Called when a player changes class at class selection.
