Quote:
Originally Posted by [XST]O_x
Okay,I see you have a cops and robbers server right?
That's pretty simple =P
pawn Код:
enum pInfo { Jailed };
new PlayerInfo[MAX_PLAYERS][pInfo];
Okay now,under your arrest command after all SetPlayerPos(id,JailPositions..) add this:
pawn Код:
PlayerInfo[id][Jailed] = 1;
And now /kill and /rob
pawn Код:
if(strcmp(cmd, "/kill", true) == 0) { if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,color,"You cannot kill yourself while you're jailed!"); else return SetPlayerHealth(playerid,0); return 1; } if(strcmp(cmd, "/rob", true) == 0) { if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,color,"You cannot rob someone/a store while you're jailed"); else { // Rest of your script } return 1; }
|
ahh i get errors we this go:
enum pInfo
{
Jailed
};