07.09.2017, 19:55
Hi, I would like to remove the maxadmin level function in my irc mute and unmute commands
this :
i want remove it from cmd who can help?
this :
Код:
if((AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) ) {
Код:
IRCCMD:mute(botid, channel[], user[], host[], params[]) { // Check if the user is at least a halfop in the channel if (IRC_IsHalfop(botid, channel, user)) { new playerid, reason[64]; // If the user did enter a player ID, then the command will not be processed if (sscanf(params, "dz", playerid, reason)) { return 1; } // If the player is not connected, then nothing will be done if (IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID) { new string[128], playername[MAX_PLAYER_NAME]; // If no reason is given, then "No reason" will be stated if (isnull(reason)) { format(reason, sizeof(reason), "No reason"); } if((AccInfo[playerid][Level] != Info[MaxAdminLevel]) ) { if(AccInfo[playerid][Muted] == 0) { GetPlayerName(playerid, playername, sizeof(playername)); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); AccInfo[playerid][Muted] = 1; AccInfo[playerid][MuteWarnings] = 0; format(string,sizeof(string),"You have been muted by IRC Administrator %s [reason: %s]",user,reason); Inter_SendClientMessage(playerid,blue,string); format(string,sizeof(string),"2You have muted %s [reason: %s]", playername,reason); return IRC_GroupSay(groupID, IRC_CHANNEL, string); } else return IRC_GroupSay(groupID, IRC_CHANNEL, "4Player is already muted"); } else return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: Player is the highest level admin"); } else return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: Player is not connected"); } else return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: You must be channel half operator to use this commands"); } IRCCMD:unmute(botid, channel[], user[], host[], params[]) { // Check if the user is at least a halfop in the channel if (IRC_IsHalfop(botid, channel, user)) { new playerid, playername[MAX_PLAYER_NAME],string[128]; // If the user did enter a player ID, then the command will not be processed if (sscanf(params, "d", playerid)) { return 1; } // If the player is not connected, then nothing will be done if (IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID) { if(AccInfo[playerid][Level] != Info[MaxAdminLevel]) { if(AccInfo[playerid][Muted] == 1) { PlayerName2(playerid, playername, sizeof(playername)); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); AccInfo[playerid][Muted] = 0; AccInfo[playerid][MuteWarnings] = 0; format(string,sizeof(string),"You have been unmuted by IRC Administrator %s",user); Inter_SendClientMessage(playerid,blue,string); format(string,sizeof(string),"2You have unmuted %s", playername); return IRC_GroupSay(groupID, IRC_CHANNEL, string); } else return IRC_GroupSay(groupID, IRC_CHANNEL, "2Player is not muted"); } else return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: Player is the highest level admin"); } else return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: Player is not connected"); } else return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: You must be channel half operator to use this command"); }