Jail - 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 (
/showthread.php?tid=116983)
Jail -
_Sami_ - 30.12.2009
It Works fine but when i jail player .In jail command i use SetTimer so it works fine but after unjailing player it again sets the unjail position of player after 5 minutes .Can any one help me please.
Код:
SetTimer("Jailed",300000,1);
Код:
public Jailed()
{
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if(logged[playerid] == 1) return 0;
else
if(logged[playerid] == -2)
TogglePlayerControllable(playerid, 1);
logged[playerid] = 1;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2295.9700,2468.1985,10.8203);
ResetPlayerWeapons(playerid);
ResetPlayerMoney(playerid);
SendClientMessage(playerid, COLOR_BRIGHTRED, "You have been unjailed.");
return 1;
}
Re: Jail -
Mike Garber - 30.12.2009
I assume yours look like this;
pawn Код:
SetTimer("timername",time,1);
(The 1 (can also be called
true) means It will repeat).
Set it to
false (0) to prevent It to repeat.
That will repeat the timer.
Read
https://sampwiki.blast.hk/wiki/SetTimer
Re: Jail -
_Sami_ - 31.12.2009
thanks it worked