Quit This in the script
#2

That code is such a mess, jesus.

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");
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:

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);
    }
}
Reply


Messages In This Thread
Quit This in the script - by NitroZeth - 07.09.2017, 19:55
Re: Quit This in the script - by MP2 - 08.09.2017, 00:39

Forum Jump:


Users browsing this thread: 1 Guest(s)