ZCMD /ban command
#10

Learning SSCANF is very simple. So here i quickly created one for you.

pawn Код:
CMD:ban(playerid,params[])
{
    new id,reason,pName[MAX_PLAYER_NAME],string[128];
    if(sscanf(params,"uz[128]",id)) SendClientMessage(playerid,COLOR_RED,"System: /ban [ID]");
    else
    {
        if(PlayerInfo[playerid][pAdmin] >=4)
        {
            GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
            format(string,sizeof(string),"Player %s was banned by %s Reason: %s",id,pName,reason);
            SendClientMessageToAll(COLOR_RED,string);
            BanEx(id,"reason");
        }
    }
    return 1;
}
Reply


Messages In This Thread
ZCMD /ban command - by samtey - 14.08.2011, 17:35
Re: ZCMD /ban command - by doreto - 14.08.2011, 17:38
Re: ZCMD /ban command - by Michael@Belgium - 14.08.2011, 17:39
Re: ZCMD /ban command - by doreto - 14.08.2011, 17:43
AW: ZCMD /ban command - by samtey - 14.08.2011, 17:47
Re: ZCMD /ban command - by PhoenixB - 14.08.2011, 17:48
Re: ZCMD /ban command - by doreto - 14.08.2011, 17:49
Re: ZCMD /ban command - by Darnell - 14.08.2011, 17:53
Re: ZCMD /ban command - by PhoenixB - 16.08.2011, 16:26
Re: ZCMD /ban command - by Shockey HD - 16.08.2011, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)