SA-MP Forums Archive
Help with unjail timer - 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 with unjail timer (/showthread.php?tid=174762)



Help with unjail timer - zack3021 - 06.09.2010

Ok guys i would love to know how to make a timer for my jail script, like, if a player is 3 wanted stars, they get 10 min in jail, then the unjail after 10 mins are up. I know how to make the timer, i am just confused with the GetPlayerWantedLevel

Can i get a similar one to this?

Код:
if GetPlayerWantedLevel(ID,3<=))*then SetTimer("Wanted",900000,false);



Re: Help with unjail timer - zack3021 - 06.09.2010

Ok guys if you dont understand, i mean is there a way to put this, what have i done wrong?

Код:
if GetPlayerWantedLevel(ID,3<=))*then SetTimer("Wanted",900000,false);
Guys any help would be appreciated.


Re: Help with unjail timer - [DR]GodOfWar - 06.09.2010

Nice.Thanks


Re: Help with unjail timer - zack3021 - 06.09.2010

Whats that supposed to mean?

If it helped you i am happy it helped you but sad it did not help me.


Re: Help with unjail timer - PinkFloydLover - 07.09.2010

i geuss put in your jail command something like:

pawn Код:
if(GetPlayerWantedLevel(playerid) > 2) return SetTimerEx(playerid,"YourJailTimer",600000,false,"i",othername
change "othername" to the variable you used to store the other players name in, the "i", stands for interval which is a number

then down the bottom:
pawn Код:
public YourJailTimer(playerid)
{
      //unjail him here
      return 1;
}



Re: Help with unjail timer - willsuckformoney - 07.09.2010

pawn Код:
if(GetPlayerWanted(playerid) <= 3) return SetTimerEx("WantedT1",,600000,false,"i",playerid);

forward WantedT1(playerid);
public WantedT1(playerid)
{
         SendClientMessage(playerid,COLOR,"You been released.");
         SetPlayerPos(playerid,x,y,z);     //Set there pos to where u want
         return 1;
}
?? D:


Re: Help with unjail timer - zack3021 - 07.09.2010

Thanks guys, btw i used Cale's script because he was first, and Cale you for got to tell me to forward the timer, and a little errors, but i fixed them.