How to save a timer?
#1

I want to know how you save a timer for a Payday system?

Thanks.

For example: Every hour you recieve a certain amount cash.
Reply
#2

You can use https://sampwiki.blast.hk/wiki/Gettime And do it like that every hour bare in mind this will only work every server hour rather then a client hour, to do a client hour I would recommend doing and hour timer.
Reply
#3

How would I do that?
Reply
#4

Create a player variable which saves called LastPayday. Use the following check under a timer which you should create that sets off every 10 to 20 seconds.

pawn Код:
new currentTickcount = tickcount();

if(currentTickcount - LastPayday[playerid] >= 3600000)
{
    Payday();
    LastPayday[playerid] = currentTickcount;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)