Hello, I Need 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)
+--- Thread: Hello, I Need Help. (
/showthread.php?tid=533822)
Hello, I Need Help. -
YanLanger - 26.08.2014
Hello!
I got jail command but you can escape using /cs (class selection)
Is there anyway to make that i cannot use commands in jail?
So it will say "You Can't Use Command While You Are Jailed"
Or Something like that.
Thanks
Re: Hello, I Need Help. -
ThePhenix - 26.08.2014
You can do this, don't forget to change the variable Jailed to the one you use.
INFO: This will only work if you use zcmd, I suppose you do.
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(Jailed[playerid] == 1) return SendClientMessage(playerid, 0x2D4B1FFF, "You can't use any command while in jail.");
return 1;
}
Re: Hello, I Need Help. -
YanLanger - 26.08.2014
What do you mean variable?
Re: Hello, I Need Help. -
ThePhenix - 26.08.2014
There must be a variable or pvar in your script to check if some player is in jail or not. That's up to you to find though.
Re: Hello, I Need Help. -
rockhopper - 26.08.2014
Yea Use variable called Jailed Or Whatever When You JAil a persone MAke it 1 like this Jalied = 1 And Add that code of ThePhenix