10.02.2010, 22:41
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;
}