24.10.2009, 08:50
hello!
i have a problem with a simple /count command:
id like to make a "-f" parameter at the end of the command. If the command consists it, all players will be frozen, but if not, they wont.
so, eg.: /count 10 (noone freezes) , /count 10 -f (everybody freezes)
i have the command i just need an 'if'
Could someone help me ?
SOLVED!
i have a problem with a simple /count command:
id like to make a "-f" parameter at the end of the command. If the command consists it, all players will be frozen, but if not, they wont.
so, eg.: /count 10 (noone freezes) , /count 10 -f (everybody freezes)
i have the command i just need an 'if'
Код:
if(strcmp(cmd,"/count", true) == 0) // Starts a count down { tmp = strtok(cmdtext, idx); new count = strval(tmp); if (!strlen(tmp)) count = 5; if (AccountInfo[playerid][AdminLevel] < 3) return SendClientMessage(playerid,RED,"Nincs hozzб jogosultsбgod!"); // "you are not in the rquired level" if (countval == 1) return SendClientMessage(playerid, RED, "Mбr folyamatban van egy visszaszбmolбs!"); // "countdown in progress" if([HERE SHOULD BE THE -f IF] && AccountInfo[playerid][AdminLevel] >=4) { for(new i=0; i<MAX_PLAYERS; i++) { TogglePlayerControllable(i, false); } } Count = count; CountDown(); return 1; }
SOLVED!