Help with ban system.
#9

or u can use it just like this:
pawn Код:
CMD:banid(playerid, params[])
{
    if(IsPlayerAdmin2[playerid] == 2)
    {
        new targetid, reason[64], name[24], msg[64];
        if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /banid <playerid> <reason>");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "That player is not connected");
        GetPlayerName(targetid, name, sizeof(name));
        format(msg, sizeof(msg), "%s (%d) was banned. Reason: %s", name, targetid, reason);
        SendClientMessageToAll(COLOR_RED, msg);
        if(GetPVarInt(targetid, "Logged"))
        {
            new filename[64];
            format(filename, sizeof(filename), "MaceRP/users/%s.ini", PlayerName(targetid));
            dini_IntSet(filename, "Banned", 1);
        }
        BanEx(targetid, reason);
        GameTextForPlayer(targetid, "You has been banned", 4000, 3);
        return 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "You can't use this command.");
        return 1;
    }
}
if u have not tuped any word after playerid u cant ban that player xD
ignore the dini xD
Reply


Messages In This Thread
Help with ban system. - by budelis - 30.07.2011, 13:44
Re: Help with ban system. - by Runedog48 - 30.07.2011, 13:48
Re: Help with ban system. - by budelis - 30.07.2011, 14:07
Re: Help with ban system. - by rjjj - 30.07.2011, 14:58
Re: Help with ban system. - by [MWR]Blood - 30.07.2011, 15:48
Re: Help with ban system. - by budelis - 30.07.2011, 16:28
AW: Help with ban system. - by samtey - 30.07.2011, 17:36
Re: Help with ban system. - by HyperZ - 30.07.2011, 18:51
Re: Help with ban system. - by Rafa - 30.07.2011, 18:58
Re: Help with ban system. - by budelis - 30.07.2011, 20:56

Forum Jump:


Users browsing this thread: 2 Guest(s)