08.09.2017, 00:39
That code is such a mess, jesus.
Just remove that line, its associated brackets and the code inside the brackets.
Remove this line also:
I always hate seeing that indentation style and the use of loads of else/if statements - it just makes the code harder to read. This is much clearer:
Just remove that line, its associated brackets and the code inside the brackets.
Remove this line also:
pawn Код:
} else return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: Player is the highest level admin");
pawn Код:
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)) return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: You must be channel half operator to use this command");
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))
{
// If the player is not connected, then nothing will be done
if (!IsPlayerConnected(playerid) || playerid != INVALID_PLAYER_ID) return return IRC_GroupSay(groupID, IRC_CHANNEL, "4ERROR: Player is not connected");
// Check if the player is already muted
if(AccInfo[playerid][Muted] == 0) return IRC_GroupSay(groupID, IRC_CHANNEL, "2Player is not muted");
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);
}
}