Help me with this (floatround/timer/countdown) - 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: Help me with this (floatround/timer/countdown) (
/showthread.php?tid=470068)
Help me with this (floatround/timer/countdown) -
ToiletDuck - 16.10.2013
I dont know how to start lol, its all about countdown im about to make it textdraw for example
hours*3600
when i set hours = 1 out come 1*3600 equevalent to 1hour
how can i make that 3600 secs by dividing something that would make appear 1 Hour Left, and when its below 1 hour the out come will become in Minutes, For example 59mins left..58Mins left something like that
am i going to use floatround? and how? can anyone explain and teach me.
Sorry for my bad english
Re: Help me with this (floatround/timer/countdown) -
]Rafaellos[ - 16.10.2013
Devide by 60. 3600 will become 60 so check if its <= 60 so its 1 hour + minutes else > 60 minutes.
I'm not sure if it will work tho.
Re: Help me with this (floatround/timer/countdown) -
iZN - 16.10.2013
You can get hours with this function..
pawn Код:
stock CountDown(hours, countdown)
{
new count = countdown - gettime();
while(count > 3600)
{
hours ++;
count = count - 3600;
}
return true;
}