ID Bug Again.
#5

Quote:
Originally Posted by HyperZ
Посмотреть сообщение
pawn Код:
CMD:ban(playerid, params[])
{
    new playerb, ip;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");

    if(PlayerInfo[playerid][pAdmin] > 1) {
        new player, reason[126];
        if(sscanf(params, "us[126]", player, reason)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /ban [playerid] [reason]");

        if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected.");
        new string[126];

        if(PlayerInfo[playerid][pAdmin] < PlayerInfo[player][pAdmin])
        {
            format(string, sizeof(string), "AdmCmd: %s has been kicked because they attempted to ban a higher admin!", RPN(playerid));
            SendClientMessageToAll(COLOR_DARKRED, string);
        }

        format(string, sizeof(string), "AdmCmd: %s has been banned by %s %s, reason: %s",RPN(playerb), RPALN(playerid), RPN(playerid), reason);
        SendClientMessageToAll(COLOR_DARKRED, string);
        Ban(playerb);
        AddBan(ip);
    }
    return 1;
}
Still unsure what i did wrong.
Reply


Messages In This Thread
ID Bug Again. - by Laure - 05.06.2014, 04:24
Re: ID Bug Again. - by Parallex - 05.06.2014, 04:25
Re: ID Bug Again. - by Laure - 05.06.2014, 04:27
Re: ID Bug Again. - by HyperZ - 05.06.2014, 04:29
Re: ID Bug Again. - by Laure - 05.06.2014, 04:30
Re: ID Bug Again. - by HyperZ - 05.06.2014, 04:32
Re: ID Bug Again. - by Laure - 05.06.2014, 04:32
Re: ID Bug Again. - by HyperZ - 05.06.2014, 04:34
Re: ID Bug Again. - by Laure - 05.06.2014, 04:35
Re: ID Bug Again. - by HyperZ - 05.06.2014, 04:38

Forum Jump:


Users browsing this thread: 1 Guest(s)