SA-MP Forums Archive
Timer Question - 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: Timer Question (/showthread.php?tid=521571)



Timer Question - danish007 - 23.06.2014

Simple Question!

How To Set Timer Or Timer Ex For All Players?

like someone robbed the bank and then set timer or set timer for all


Re: Timer Question - RenovanZ - 23.06.2014

pawn Код:
CMD:robbank(playerid, params[]) //or whatever
{
    //blablabla
    //blebleble
    SetTimerEx("YourFunc", YourTimeInMilisec, repeating? true/false, "i", playerid);
}

forward YourFunc(playerid);
public YourFunc(playerid)
{
    //do something
}



Re: Timer Question - kamiliuxliuxliux - 23.06.2014

Just set global timer? SetTimer();


Re: Timer Question - danish007 - 23.06.2014

settimer works for all?


Re: Timer Question - Konstantinos - 23.06.2014

You'll need a player loop inside the timer's callback if you use SetTimer function.


Re: Timer Question - danish007 - 23.06.2014

can u show me?


Re: Timer Question - Konstantinos - 23.06.2014

https://sampwiki.blast.hk/wiki/Loops


Re: Timer Question - danish007 - 23.06.2014

aight thanks@!!!