zcmd to ip ban
#10

pawn Код:
COMMAND:ipban(playerid, params[])
{
    new PlayerToBan, Reason[128], Msg[128], Name[24], Admin[24];

    if (sscanf(params, "us[128]", PlayerToBan, Reason))
        SendClientMessage(playerid, 0xFF0000AA, "[Usage]: /ipban [PlayerToBan] [Reason]");
            else
            {
                if (IsPlayerConnected(PlayerToBan))
                {
                    GetPlayerName(playerid, Admin, sizeof(Admin));
                    GetPlayerName(PlayerToBan, Name, sizeof(Name));

                    format(Msg, 128, "{FF0000}You have been IP-banned by {FFFFFF}%s", Admin);
                    SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg);
                    format(Msg, 128, "{FF0000}Reason: {FFFFFF}%s", Reason);
                    SendClientMessage(PlayerToBan, 0xFFFFFFFF, Msg);

                    BanEx(PlayerToBan, Reason);

                    format(Msg, 128, "{FF0000}%s has IP-banned {FFFFFF}%s", Admin, Name);
                    SendClientMessageToAll(0xFFFFFFFF, Msg);
                }
                else
                    return 0;
            }
            else //18714
                return 0; //18715

    return 1; //18717
}
Reply


Messages In This Thread
zcmd to ip ban - by Fiore - 29.12.2012, 21:57
AW: zcmd to ip ban - by Blackazur - 29.12.2012, 21:59
Re: zcmd to ip ban - by Mr.Anonymous - 29.12.2012, 22:06
Re: zcmd to ip ban - by Fiore - 29.12.2012, 22:07
Re: zcmd to ip ban - by Mr.Anonymous - 29.12.2012, 22:18
Re: zcmd to ip ban - by Fiore - 29.12.2012, 22:25
Re: zcmd to ip ban - by Mr.Anonymous - 29.12.2012, 22:30
Re: zcmd to ip ban - by Fiore - 29.12.2012, 22:35
Re: zcmd to ip ban - by Mr.Anonymous - 29.12.2012, 22:37
Re: zcmd to ip ban - by Fiore - 29.12.2012, 22:40

Forum Jump:


Users browsing this thread: 2 Guest(s)