Help with Format(...)
#1

Hello, I have this piece of code:

pawn Код:
//Above GameModeInit
new Uptime:
//OnGameModeInit:
Uptime = GetTickCount();
//In a command
{
    new timestr[20], uptimeex;
    uptimeex = GetTickCount() - Uptime;
    format(timestr, sizeof(timestr), "%d", uptimeex);
    SendClientMessage(playerid, 0xFFFFFFFF, timestr);
    return 1;
}
And if my server has been on for 10.5 seconds, i get 10500 when i type the command. (I know its milliseconds.)
And if i do this instead:
format(timestr, sizeof(timestr), "%d", uptimeex/1000);
I get 105.

Wich i want to change to 10.5, any idea how to do this?
Reply


Messages In This Thread
Help with Format(...) - by [NWA]Hannes - 30.12.2010, 13:27
Re: Help with Format(...) - by _rAped - 30.12.2010, 13:29
Re: Help with Format(...) - by MadeMan - 30.12.2010, 13:46
Re: Help with Format(...) - by _rAped - 30.12.2010, 13:49
Re: Help with Format(...) - by [NWA]Hannes - 30.12.2010, 14:07
Re: Help with Format(...) - by MadeMan - 30.12.2010, 14:21
Re: Help with Format(...) - by [NWA]Hannes - 30.12.2010, 14:53
Re: Help with Format(...) - by MadeMan - 30.12.2010, 14:56
Re: Help with Format(...) - by [NWA]Hannes - 30.12.2010, 15:06
Re: Help with Format(...) - by [NWA]Hannes - 30.12.2010, 15:13

Forum Jump:


Users browsing this thread: 1 Guest(s)