Ban system- help.
#9

COMMAND:
pawn Код:
CMD:ban(playerid,params[])
{
    if(pInfo[playerid][Admin] >= 3)
    {
        if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, RED,"Usage: /ban [id] [reason]");
       
        new INI:ban1 = INI_Open(Path(id));
        INI_SetTag(ban1, "Player's Data");
        INI_WriteInt(ban1, "Banned", 1);
        INI_WriteString(ban1, "Breason",reason);
        INI_Close(ban1);
        pInfo[id][Banned] = 1;
    }
    return 1;
}
Load stock:
pawn Код:
forward loadaccount_user(playerid, name[], value[]);
public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", pInfo[playerid][Pass],129);
    INI_Int("Money",pInfo[playerid][Money]);
    INI_Int("Scores",pInfo[playerid][Scores]);
    INI_Int("Kills",pInfo[playerid][Kills]);
    INI_Int("Deaths",pInfo[playerid][Deaths]);
    INI_Int("AdminLvl",pInfo[playerid][Admin]);
    INI_Int("Banned",pInfo[playerid][Banned]);
    INI_String("Breason",pInfo[playerid][Breason],300);
    return 1;
}
under on player dis
INI_WriteInt(file,"Banned",pInfo[playerid][Banned]);
INI_WriteString(file,"Breason",pInfo[playerid][Breason]);
any thing else?
Reply


Messages In This Thread
Ban system- help. - by ZToPMaN - 31.03.2016, 22:45
Re: Ban system- help. - by ZToPMaN - 01.04.2016, 01:32
Re: Ban system- help. - by itsCody - 01.04.2016, 01:36
Re: Ban system- help. - by ZToPMaN - 01.04.2016, 01:46
Re: Ban system- help. - by itsCody - 01.04.2016, 01:48
Re: Ban system- help. - by ZToPMaN - 01.04.2016, 01:50
Re: Ban system- help. - by ZToPMaN - 02.04.2016, 10:42
Re: Ban system- help. - by introzen - 02.04.2016, 12:04
Re: Ban system- help. - by ZToPMaN - 02.04.2016, 14:18
Re: Ban system- help. - by introzen - 02.04.2016, 14:41

Forum Jump:


Users browsing this thread: 1 Guest(s)