16.05.2020, 18:50
Helo i try to make an delay to commands but i get this...
Is work great but when i try to use other command who have delay is take the delay from comand [/money]
I wanna that delay to be only to /money not to all comands with delay
PHP Code:
new delay[MAX_PLAYERS];
ptask delaytime[1000](playerid)
{
if(delay[playerid] != 0)
{
delay[playerid]--;
}
return 1;
}
YCMD:money(playerid, params[], help)
{
if(delay[playerid] != 0)
return SendFormatMessage(playerid,-1,"Nu poti sa utilizezi aceasta comanda timp de %i secunde",delay[playerid]);
GivePlayerMoney(playerid, strval(params));
delay[playerid] = 10;
return 1;
}
I wanna that delay to be only to /money not to all comands with delay
PHP Code:
YCMD:buylevel(playerid, params[], help)
{
if(delay[playerid] != 0)
return SendFormatMessage(playerid,-1,"[ANTI-SPAM]:Nu poti sa utilizezi aceasta comanda timp de %i secunde",delay[playerid]);
// my code...
delay[playerid] = 10;
return 1;
}