[Help] /kill - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] /kill (
/showthread.php?tid=81645)
[Help] /kill -
joeri55 - 12.06.2009
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:
Re: [Help] /kill -
HuRRiCaNe - 12.06.2009
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
Re: [Help] /kill -
joeri55 - 12.06.2009
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?
Re: [Help] /kill -
HuRRiCaNe - 12.06.2009
why u use this?---) if (gTeam[playerid] == TEAM_BLUE)
so u are a cop and cops can /jail?
Re: [Help] /kill -
joeri55 - 12.06.2009
Yes it's for cops but they are only alowed to jail when he is at the garage or he gets a temp ban.
Re: [Help] /kill -
HuRRiCaNe - 13.06.2009
IfJailed[0]
IsJailed[1]
did you try it?
Re: [Help] /kill -
ByFukara - 14.06.2009
you should add this command to under of /jail command
IsJailed[playerid] = 1;
Re: [Help] /kill -
joeri55 - 15.06.2009
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.
Re: [Help] /kill -
joeri55 - 18.06.2009
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.
Re: [Help] /kill -
mamorunl - 18.06.2009
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 : >