Posts: 1,018
Threads: 320
Joined: Jul 2010
Hello I was trying to make when once player advertise then if that player or someone else try again to advertise I want to says between advertisement you must wait 45 seconds. Remaining time: %d seconds. Is this hard to make? Thanks
Posts: 450
Threads: 10
Joined: May 2014
Reputation:
0
"Hard" - I don't know
"Possible" - yes using SetTimer.
Posts: 1,018
Threads: 320
Joined: Jul 2010
I was try something like this and when I type ad first okay second when I type it show me remaining seconds 213459 instead of 45 44 etc...
if(gettime() < adtime) return SCMF(playerid,0xDB023EFF,"between advertisement you must wait 45 seconds. Remaining time: %d seconds",adtime);
and here I set when is fist time advertise giving
adtime = gettime() + 45;
Posts: 450
Threads: 10
Joined: May 2014
Reputation:
0
Convert the milliseconds into seconds then floatround(time value in seconds,float_ceil);
Posts: 624
Threads: 110
Joined: Apr 2012
Reputation:
0
Create the timer under the advertisement command, thats really simple.
Posts: 1,018
Threads: 320
Joined: Jul 2010
Quote:
Originally Posted by Imperor
He wants to have the seconds remaining too before posting another advertisement.
|
how can make that ? thanks
Posts: 1,018
Threads: 320
Joined: Jul 2010
It doesn't work first I give ad ok and second time I can do it again and third time etc...