#1

How do make it only 1 hour (Taking In Real Life time) or checking if :00 then comes payday?
Reply
#2

Set a timer for 60000*60

I think...
Reply
#3

That's ingame, but i want make it, takes in real life time. When IRL time is 22:00 then comes payday, 23:00 comes payday... bla bla
Reply
#4

Yeah, 60000 = 1 minute * 60 = 60minutes.

I think...
Reply
#5

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Yeah, 60000 = 1 minute * 60 = 60minutes.

I think...
Nono, THAT IS INGAME, AND WILL NOT TAKING REALLIFE TIME...

Like, i create server in time 21:52 then 22:52 comes payday..? NOT, only :00, like 22:00, 23:00
Reply
#6

pawn Код:
new t[3];
gettime(t[0], t[1], t[2]);
if(t[1] == 0)
{
    PayDay();
}
Something like that in a timer could work.
Refer to https://sampwiki.blast.hk/wiki/gettime
Reply
#7

Quote:
Originally Posted by Picharelo
Quote:
Originally Posted by ViruZZzZ_ChiLLL
Yeah, 60000 = 1 minute * 60 = 60minutes.

I think...
Nono, THAT IS INGAME, AND WILL NOT TAKING REALLIFE TIME...

Like, i create server in time 21:52 then 22:52 comes payday..? NOT, only :00, like 22:00, 23:00
How is the not real life time? Im not saying i support his method (i actually think its the worst possible way to do that). Look up GetTickCount, thats the way to go about doing this. With the GetTickCount method, you can make it so they have to be IN GAME for an hour, or you can sync it with real life and even pay for the hours they were not online (which is dumb IMO).
Reply
#8

Quote:
Originally Posted by //exora
pawn Код:
new t[3];
gettime(t[0], t[1], t[2]);
if(t[1] == 0)
{
    PayDay();
}
Something like that in a timer could work.
Refer to https://sampwiki.blast.hk/wiki/gettime
Hmm that work's?

SetTimer("MinutesToPayday", 100, 1);

public MinutesToPayday()
{
new t[3];
gettime(t[0], t[1], t[2]);
if(t[1] == 0)
{
PayDay();
}
}
Reply
#9

pawn Код:
SetTimer("MinutesToPayday", 55000, 1);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)