Jail help - 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: Jail help (
/showthread.php?tid=81547)
Jail help -
joeri55 - 11.06.2009
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.
Re: Jail help -
miokie - 11.06.2009
Disable /Kill when jailed?
Re: Jail help -
joeri55 - 11.06.2009
Thanks never tought of that. :P
Re: Jail help -
joeri55 - 11.06.2009
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.
Re: Jail help -
miokie - 11.06.2009
At the top of your script:
pawn Код:
new IsJailed[MAX_PLAYERS];
When you jail a player:
When you unjail a player:
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;
}
Re: Jail help -
joeri55 - 11.06.2009
Really thanks mate.