Jail help
#1

Hello,

I've got a problem if I use /jail or /ajail and someone does /kill he doesn't respawns till his time is up he just goes back to the living world if you know what I mean. If anyone has a solution please post it.
Reply
#2

Disable /Kill when jailed?
Reply
#3

Thanks never tought of that. :P
Reply
#4

But how can I disable the command /kill when someone is in jail?

pawn Код:
if(strcmp(cmd, "/kill", true) == 0)
    {
        SetPlayerHealth(playerid,0.0);
        return 1;
    }
That's my /kill command.
Reply
#5

At the top of your script:
pawn Код:
new IsJailed[MAX_PLAYERS];
When you jail a player:
pawn Код:
IsJailed[playerid] = 1;
When you unjail a player:
pawn Код:
IsJailed[playerid] = 0;
your Kill command:
pawn Код:
if(strcmp(cmd, "/kill", true) == 0)
{
    if(IsJailed[playerid] == 1) return SendClientMessage(playerid,COLOR," you cannot kill yourself when jailed!");
    SetPlayerHealth(playerid,0.0);
    return 1;
}
Reply
#6

Really thanks mate.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)