zroT Posted February 12, 2011 Posted February 12, 2011 Cum adaug la o comanda sa fie folosita decat dupa 30 de secunde de la ultima utilizare?
IstuntmanI Posted February 12, 2011 Posted February 12, 2011 //sus in script new ICanUseCommand[MAX_PLAYERS]; //la onplayercommandtext if(strcmp(cmdtext,"/command",true) == 0) { if(ICanUseCommand[playerid] == 1) { //restul comenzii ICanUseCommand[playerid] = 0; SetTimerEx("NowICan",30000,0,"i",playerid); } else { SendClientMessage(playerid,COLOR_RED,"You can't use this command right now, wait some seconds!"); return 1; } //pe la finalul scriptului forward NowICan(playerid); public NowICan(playerid) { ICanUseCommand[playerid] = 1; } That's all :P
Question
zroT
Cum adaug la o comanda sa fie folosita decat dupa 30 de secunde de la ultima utilizare?
1 answer to this question
Recommended Posts