Timer
#3

Better realisation, without using timers
PHP код:
new commandShopUsed[MAX_PLAYERS];
#define commandShopInterval 3600 //in seconds
CMD:shop(playerid) {
    if (
gettime() < commandShopUsed[playerid])
        return 
SendClientMessage(playerid, -1"Please Wait to use this command again");
    
commandShopUsed[playerid] = gettime() + commandShopInterval;
    
//Common code starts here
    
return true;

You can save commandShopUsed[playerid] to player's account
Reply


Messages In This Thread
Timer - by AnonScripter - 24.09.2013, 21:09
Re: Timer - by DanishHaq - 24.09.2013, 21:30
Re: Timer - by =KempeR= - 24.09.2013, 21:42
Re: Timer - by AnonScripter - 24.09.2013, 22:25
Re: Timer - by Krakuski - 24.09.2013, 22:29
Re: Timer - by DanishHaq - 24.09.2013, 22:43
Re: Timer - by =KempeR= - 24.09.2013, 22:54
Re: Timer - by AnonScripter - 24.09.2013, 23:02
Re: Timer - by AnonScripter - 24.09.2013, 23:25
Re: Timer - by =KempeR= - 24.09.2013, 23:37

Forum Jump:


Users browsing this thread: 4 Guest(s)