10.09.2013, 05:59
Create a variable that indicates whether a player is jailed or not. On the code below, it would just be temporary. So I suggest that you add it up onto your player stats or information (usually PlayerInfo[MAX_PLAYERS][pInfo] for role-play servers), add something like PlayerInfo[playerid][pJailed]
Then restrict admins by simply checking if that variable is not 0, meaning the player is jailed. Do something like this:
Then restrict admins by simply checking if that variable is not 0, meaning the player is jailed. Do something like this:
pawn Код:
if(PlayerInfo[ID_OF_PLAYER][pJailed] != 0) return SendClientMessage(playerid, -1, "Error: That player is in jail. You cant give him cars.");