22.05.2016, 12:48
Hi guys , i need some help i have this code and i want to add a cooldown , player can use it only every minute
Код:
CMD:dive(playerid, params[]) { new highness; if(sscanf(params,"i",highness))return SendClientMessage(playerid,COLOR_GREEN,"/dive [high 100-800]"); if (highness < 100 || highness > 800) return SendClientMessage(playerid,COLOR_GREEN,"/dive [high 100-800]");//COLOR_BROWN SendClientMessage(playerid,COLOR_RED,"You dive. Enjoy."); new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerPos(playerid,x,y,z+highness); GivePlayerWeapon(playerid, 46, 1); SendAdminCMD(playerid, "dive"); return 1; }