[Help]Gettickinsecond
#1

How do miliseconds when a player hits the rec example 2.13sec?
PHP код:
FUNCTION: xReactionTest(playerid)
{
    new
        
xLength = (random(8) + 2),
        
string[256]
    ;
    
xCash = (random(784) + 287);
    
format(xChars, sizeof(xChars), "");
    
Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);
    
format(string, sizeof(string), "{FF0000}[TK]{FFFFFF}Ko prvi upise u cetu {FF0000}%s{FFFFFF} dobija %d$. TRENUTNI REKORD: %s (%.i sek.)", xChars, xCash,ImeMarkoni(playerid),GetTimerInSeconds(GetTickCount()));
    
SendClientMessageToAll(PURPLE, string);
    
KillTimer(xReactionTimer);
    
xTestBusy = true;
    
SetTimer("xReactionProgress", 50000, 0);
    
//return 1;
}
GetTimerInSeconds(now,playerid)
{
    new 
timers = PlayerInfo[playerid][pStartTime];
   new 
secs, ms;
   
ms = now - timers;
   while(
ms > 999) {
       
secs++;
       
ms = ms-1000;
   }
   return 
secs;
} 
Reply
#2

Bump!
Reply


Forum Jump:


Users browsing this thread: