[Help] Getting time from a timer...
#3

Quote:
Originally Posted by Joe Staff
You can use GetTickCount() for this.

pawn Код:
new gTimeTick;
public timerfunction()
{
  gTimeTick=GetTickCount()+(60*(60*1000));
  //your code
}

//OnPayerCommandText
  if(!strcmp(cmdtext[1],"timeleft",true))
  {
    new tmpstr[128];
    format(tmpstr,128,"%d minutes and %d seconds remaining until vehicle respawn",((gTimeTick-GetTickCount())/60000),((gTimeTick-GetTickCount())-((gTimeTick-GetTickCount())/60000)*60000)/1000);
    SendClientMessage(playerid,0xFF0000FF,tmpstr);
    return 1;
  }
LOOOL, today I was asking myself for what was GetTickCount() xDD

Thanks !!
Reply


Messages In This Thread
[Help] Getting time from a timer... - by Fedee! - 10.02.2010, 21:56
Re: [Help] Getting time from a timer... - by Joe Staff - 10.02.2010, 22:41
Re: [Help] Getting time from a timer... - by Fedee! - 10.02.2010, 22:58

Forum Jump:


Users browsing this thread: 1 Guest(s)