cooldown problem
#1

So I got a cooldown for my command, I want it to be hours:minutes, for example if you have to wait 24 hours then it'll be like >> 24:00, after 1 minute >> 23:59, after 1 more minute >> 23:58, etc.

How to do that? Here's my code;

PHP код:
        new iString[120];
        new 
currenttime gettime();
        new 
cooldown = (Cooldown[playerid] + 86400) - currenttime;
        
format(iStringsizeof(iString),"You have to wait %02d:%02d:%02d"cooldown 60cooldown 60cooldown 60);
           if(
currenttime < (Cooldown[playerid] + 120)) return SendClientMessage(playerid, -1iString);
        
Cooldown[playerid] = gettime(); 
Reply


Messages In This Thread
cooldown problem - by TobiasJones - 03.11.2016, 22:48
Re: cooldown problem - by DTV - 04.11.2016, 00:34
Re: cooldown problem - by TobiasJones - 04.11.2016, 09:46

Forum Jump:


Users browsing this thread: 1 Guest(s)