Is it possible to change GetTickCount format?
#1

As an output im using:
format(string, sizeof(string), "It took %d milliseconds to get a right answer!", GetTickCount() - count);
So it will display It took 123456 milliseconds to get a right answer
Is it possible to make it display as "It took 0.1234 milliseconds" , "it took 1.123" milliseconds and so on?

EDIT:If i use %f i will get everytime 0.00000,but this is the format i need thought.
Reply
#2

https://sampwiki.blast.hk/wiki/Float
Reply
#3

How would i implement that in my code thought.This is how im using GetTickCount()
count = GetTickCount();
format(string, sizeof(string), "It took %d milliseconds to get a right answer!", GetTickCount() - count);
count = 0;

EDIT:Fixed it,i needed to call it as
format(string, sizeof(string), "It took %f milliseconds to get a right answer!", floatdiv(GetTickCount() - count, 1000));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)