SA-MP Forums Archive
Timers 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: Timers Help! (/showthread.php?tid=272106)



Timers Help! - DragonYancy - 27.07.2011

I want to make a timer wich it gives money each 600 seconds...
How can I make this timer?


Re: Timers Help! - [HiC]TheKiller - 27.07.2011

pawn Код:
public OnPlayerConnect(playerid)
{
    SetTimerEx("givecash", 600000, "d", playerid);
    return 1;
}

forward givecash(playerid);
public givecash(playerid)
{
    GivePlayerMoney(playerid, /*Money*/);
    return 1;
}



Re: Timers Help! - MyLife - 27.07.2011

pawn Код:
SetTimerEx("GiveCash",600000,0,"ii",playerid,money);
EDIT: [HiC]TheKiller fast than me >_<'


Re: Timers Help! - Max_Coldheart - 27.07.2011

First you must create the timer, then you set it to 600 seconds, and repeating.
Then once it reaches 600 seconds, give people money with GivePlayerMoney(id, money);

Regards
Max_Coldheart

Quote:
Originally Posted by SA:MP
This forum requires that you wait 120 seconds between posts. Please try again in 59 seconds.



Re: Timers Help! - DragonYancy - 27.07.2011

Thank you TheKiller!