warn cmd help
#2

Here you go, I also cleaned your code up since it was a mess

pawn Код:
IRCCMD:warn(botid, channel[], user[], host[], params[]) {
    if(IRC_IsOp(botid, channel, user)) {
       
        new ID, reason[64], string[128], pname[24], string2[128];
       
        if(isnull(params))
            return IRC_GroupSay(gGroupID, channel,"3Usage: !warn [playerid] [reason]");
           
        if(!IsPlayerConnected(ID)) 
            return IRC_GroupSay(gGroupID, channel,"4*** Error: Invalid player ID.");
           
        GetPlayerName(ID, pname, 24);
        format(string, sizeof(string), "Admin %s (IRC) has warned %s (%d) for: %s", user, pname, ID, reason);
        SendClientMessageToAll(COLOR_GREEN, string);
        IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
        IRC_GroupSay(gGroupID,IRC_ACHANNEL, string);
        SendClientMessage(ID, red, "You have been warned by an IRC admin (IRC) to follow the rules.");
        SendClientMessage(ID, red, "Please follow the rules with /rules");
        PlayerInfo[ID][pWarn] ++;
        SetPVarInt(ID, "Warnings", GetPVarInt(ID, "Warnings") +1);
        if(GetPVarInt(ID, "Warnings") == 3) {
            format(string2, sizeof(string2), "[AUTO KICK] %s (%d) Too many admin warnings.", pname, ID);
            SendClientMessageToAll(COLOR_RED, string2);
            IRC_GroupSay(gGroupID,IRC_CHANNEL, string2);
            IRC_GroupSay(gGroupID,IRC_ACHANNEL, string2);
            Kick(ID)
        }
    }
    return 1;
}
Reply


Messages In This Thread
warn cmd help - by Face9000 - 22.10.2012, 18:17
Re: warn cmd help - by ViruZz - 22.10.2012, 19:55
Re: warn cmd help - by Face9000 - 23.10.2012, 07:06
Re: warn cmd help - by JaKe Elite - 23.10.2012, 07:14
Re: warn cmd help - by Face9000 - 24.10.2012, 17:59
Re: warn cmd help - by Jarnu - 24.10.2012, 18:03
Re: warn cmd help - by Private200 - 24.10.2012, 20:20
Re: warn cmd help - by Face9000 - 24.10.2012, 21:40

Forum Jump:


Users browsing this thread: 1 Guest(s)