All pastes #500611 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-21 17:14 UTC
rendered paste body
   	if(strcmp(cmd, "/mute", true) == 0) {
	 if(IsPlayerAdmin(playerid)==0)
	  {
		SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
		return 1;
	  } else {
     tmp = strtok(cmdtext, idx);
     if(!strlen(tmp)) {
	   SendClientMessage(playerid, COLOR_YELLOW, "*** Использование: /mute [ID] [TIME]");
	   return 1;
	   }
	   giveplayerid = strval(tmp);
        tmp = strtok(cmdtext, idx);
     if(!strlen(tmp)) {
	   SendClientMessage(playerid, COLOR_YELLOW, "*** Использование: /mute [ID] [TIME]");
	   return 1;
	   }
	   gPlayerMutedTime[giveplayerid] = strval(tmp);
  		if (IsPlayerConnected(giveplayerid)) {
			  gPlayerMuted[giveplayerid] = 1;
			  mtimer = SetTimer("Mutetimer", 1000, true);
			}
		}
		return 1;
		}
		return 1;
		}
public Mutetimer(playerid)
{
count++;
 if(count >= gPlayerMutedTime[playerid])
 {
   KillTimer(mtimer);
   gPlayerMuted[playerid] = 0;
   SendClientMessage(playerid, COLOR_YELLOW, "*** Вы разумолчены.");
 }
}