08.07.2010, 20:50
Okay,I see you have a cops and robbers server right?
That's pretty simple =P
Okay now,under your arrest command after all SetPlayerPos(id,JailPositions..) add this:
And now /kill and /rob
That's pretty simple =P
pawn Код:
enum pInfo
{
Jailed
};
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
PlayerInfo[id][Jailed] = 1;
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;
}