21.11.2014, 11:34
So basically i am creating a gamemode which has a roundtime.
I've set a variable which holds the game, once it reached one, It will end the game.
Now the problem is the timeround var is in milesecond form, The thing i am trying to do is to convert it to Minutes and Seconds, timeround is 1000*60*20 which is 20 minutes, once you divided it to 1000 it will return 1200.
Is it possible to convert mileseconds / seconds to Minutes and Seconds?
EDIT: Another problem, it doesn't update the textdraw, it is stuck on it's last textdraw update.
I've set a variable which holds the game, once it reached one, It will end the game.
Now the problem is the timeround var is in milesecond form, The thing i am trying to do is to convert it to Minutes and Seconds, timeround is 1000*60*20 which is 20 minutes, once you divided it to 1000 it will return 1200.
Is it possible to convert mileseconds / seconds to Minutes and Seconds?
EDIT: Another problem, it doesn't update the textdraw, it is stuck on it's last textdraw update.
pawn Код:
// The way how i set my timer.
SetTimer("Heartbeat", 1000, true);
public Heartbeat()
{
new string[128];
timeround --;
new seconds = timeround / 1000;
format(string, sizeof(string), "Remaining Time: ~r~%d", seconds);
TextDrawSetString(Textdraw0, string);
return 1;
}