[Help] /kill
#1

Hello,

If I use my disable kill only Cops can't use /kill in jail I know it's something with the gTeam but I don't know where to set it:
http://pastebin.com/m4f9d9ac8 (Jail Command)

And this is my disable /kill command
pawn Код:
if(strcmp(cmd, "/kill", true) == 0)
        {
    if(IsJailed[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You cannot kill yourself when jailed!");
    SetPlayerHealth(playerid,0.0);
        return 1;
}

Top of script:
pawn Код:
new IsJailed[MAX_PLAYERS];

If player is jailed:
pawn Код:
IsJailed[playerid] = 1;
Reply
#2

you have to make the cops gteam1 when they choose character , then
pawn Код:
if(IsJailed[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You cannot kill yourself when jailed!");
if(gteam[playerid] == 1)(IsJailed[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"If you area cop why you should kill?");
    SetPlayerHealth(playerid,0.0);
dont know if its correct but
anyway why, if you are a cop should be at jail
Reply
#3

That's the problem the command only works for cops I tried it because other people can do /kill in jail and because I am a cop I can't.. Can I make something like:

IfJailed[0]
IsJailed[1]

So the command always works but if you are in jail it will be activated?
Reply
#4

why u use this?---) if (gTeam[playerid] == TEAM_BLUE)
so u are a cop and cops can /jail?
Reply
#5

Yes it's for cops but they are only alowed to jail when he is at the garage or he gets a temp ban.
Reply
#6


IfJailed[0]
IsJailed[1]
did you try it?
Reply
#7

you should add this command to under of /jail command

IsJailed[playerid] = 1;
Reply
#8

I've changed my /jail but still it doesn't works..
People I need help because if people do /kill in jail they are out of jail..

http://pastebin.com/m2fe26fa1 ( My new /jail ) But it still doesn't works.
Reply
#9

Can anyone help? Maybe if someone presses /kill that he will turn back in jail inplace off saying: You can't use /kill in jail.
Reply
#10

You need to give the jailed player the IsJailed, not the cop

IsJailed[giveplayerid];

instead of : IsJailed[playerid];
Since PLAYERID is the cop... so you are 'jailing' the cop with that variable : >
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)