How To Make Ban System Place Help !! Rep+
#1

hello, how to make /ban system

using YINI

and

Playerinfo[playerid][pBanned] not Ban(playerid);

just Playerinfo[playerid][pBanned] = 1;

help ++
Reply
#2

Replace Playerinfo[playerid][pBanned] = 1;

with this

pInfo[id][Banned] = 1;
Reply
#3

pawn Код:
CMD:ban(playerid, params[])
{
    new reason[150], id;
    if (sscanf(params, "rs[100]", id, reason))
    return SendClientMessage(playerid, COLOR_RED, "Usage: /Ban [playerid] [reason]");
    if (!IsPlayerConnected(id))
    return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
    if (pInfo[playerid][Adminlevel] >=3)
    {
        new admin[MAX_PLAYER_NAME], msg1[150], msg2[150], msgtoall1[150], msgtoall2[150];
        GetPlayerName(playerid, admin, sizeof(admin));

        format(msg1, sizeof(msg1), "AdmCmd:You were banned from the server by %s", admin);
        SendClientMessage(id, 0xFFFF00AA, msg1);
        format(msg2, sizeof(msg2), "Reason: %s.", reason);
        SendClientMessage(id, 0xFFFF00AA, msg2);

        format(msgtoall1, sizeof(msgtoall1), "Player %s was banned from the server by %s", GetName(id), admin);
        SendClientMessage(id, 0xFFFF00AA, msgtoall1);
        SaveIn("BanLog",msgtoall1);
        format(msgtoall2, sizeof(msgtoall2), "Reason : %s", reason);
        SendClientMessage(id, 0xFFFF00AA, msgtoall2);
        SendCommandToAdmins(playerid,"ban");
        Ban(id);
        pInfo[id][pBanned] ++;
    }
    else
    {
    SendClientMessage(playerid,-1,"You Are Not A lvl 3 admin");
    }
    return 1;

}
put this any where
..
pawn Код:
onplayerconnect
if(pInfo[playerid][pBanned] <= 1)
{
Kick(playerid);
}
hope this helped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)