24.09.2013, 22:54
Quote:
i don't understand, i want to make it 1 minute to could use the command again, so how the server would know that if i won't put 60000 milliseconds of time ?
|
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;
}