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, "*** Вы разумолчены."); } }