27.03.2010, 21:53
I know that's easy but I am new to pawno :P
How do I turn this:
To: When timer is counting down then no one can use it again while it's counting.
Help please
How do I turn this:
Код:
if (strcmp(cmd, "/cd", true) == 0) { if(PlayerInfo[playerid][pAdmin] < 3) return DenyMessage(playerid, 3); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"/countdown [seconds] [freeze 1/0]"); cd_sec = strval(tmp); if(cd_sec < 0||cd_sec >1000) return SendClientMessage(playerid,COLOR_WHITE,"SERVER: Seconds between 0-1000"); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"/countdown [seconds] [freeze 1/0]"); cd_f = strval(tmp); if(cd_f < 0 || cd_f > 1) return SendClientMessage(playerid,COLOR_WHITE,"/countdown [seconds] [freeze 1/0]"); if(cd_f == 1) for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) TogglePlayerControllable(i, 0); } cd_timer = SetTimer("countdown",1000,3); return 1; }
Help please