How to make a ban command?
#3

pawn Код:
CMD:ban(playerid, params[])
{
    new id,reason[64], str[128];
    if(sscanf(params, "us[64]", id,reason))return SendClientMessage(playerid, COLOR_RED, ">>Error: USAGE: /Ban [ID] [Reason]");
    if(id == playerid) return SendClientMessage(playerid, COLOR_RED, ">>Error: Huh!");
    if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLOR_RED, ">>Error: Player is not connected!");
    format(str, sizeof(str), ">>Action: %s has been banned by an administrator %s. >>Reason: %s", pName(id), pName(playerid), reason);
    SendClientMessageToAll(-1, str);
    GameTextForPlayer(id, "~r~You have been banned!", 5000, 4);
    Ban(id);
    printf("Ban: %s Has Been Banned By %s, Reason: %s",pName(id), pName(playerid),reason);
    return 1;
}
Reply


Messages In This Thread
How to make a ban command? - by KyLeBlaK - 21.10.2014, 16:54
Re: How to make a ban command? - by Glossy42O - 21.10.2014, 16:56
Re: How to make a ban command? - by gurmani11 - 21.10.2014, 17:06
Re: How to make a ban command? - by KyLeBlaK - 21.10.2014, 17:58
Re: How to make a ban command? - by Th3UnKnOwN - 22.10.2014, 01:14
Re: How to make a ban command? - by Pottus - 22.10.2014, 01:42
Respuesta: Re: How to make a ban command? - by !R1Ch@rD! - 22.10.2014, 02:54

Forum Jump:


Users browsing this thread: 1 Guest(s)