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
#2

I'm not too sure if this could help you, but you could try using this.
Reply
#3

I saw a lot of players using the same code i'm using, the gettime but making it hours:minutes instead of minuteseconds.

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)