Ban checking problem
#2

pawn Код:
command(ban, playerid, params[])
{
    if(IsPlayerAdmin(playerid))//RCON
    {
        new ID, R[25], string[100];//R = Reason
        new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
        if(sscanf(params, "is", ID, R)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /ban [ID] [Reason]");                                                    
        {
            if(ID != INVALID_PLAYER_ID)
            {
                SInfo[ID][Banned]=1;//To Make Player Banned When He Connect
                GetPlayerName(playerid, name, sizeof(name));
                GetPlayerName(ID, name2, sizeof(name2));
                format(string, sizeof(string), "%s[%d] has been banned By The Admin %s[%d] - %s", ID,name2, playerid, name, R);
                SendClientMessageToAll(0xFF1493FF, string);
                Kick(ID);
            }
            else SendClientMessage(playerid, 0xFF0000AA, "ID Not Connected.")
try this may it work for you
Reply


Messages In This Thread
Ban checking problem [SOLVED] - by Uberanwar - 04.10.2014, 03:13
Re: Ban checking problem - by ThunderX - 04.10.2014, 04:31
Re: Ban checking problem - by Uberanwar - 04.10.2014, 05:41
Re: Ban checking problem - by ThunderX - 04.10.2014, 06:10

Forum Jump:


Users browsing this thread: 3 Guest(s)