Ban is not off y_ini
#1

Hello,

I'm encountering problem which is stupid and I'm sure the fix is quick & i didnt notice it. I dont even know how to ****** this problem so i'll just ask you.

When player gets banned I'm saving with y_ini the reason, banned by, and Ban =1... When player connects he sees the "you are banned" however, when im erasing by hand from his file those variables and reconnect he is still "banned", its impossiable, I'm checking if Ban = 1 and server finds it is? I'm not sure why. Its not exists in the file.
It seems like if INI_ParseFile used once, it doesn't matter if player reconnects the variables won't change? why?
OnPlayerConnect:
pawn Код:
if(fexist(UserPath(playerid)))
{
    INI_ParseFile(UserPath(playerid), "LoadUserBans_%s", .bExtra = true, .extra = playerid);
    if(PlayerInfo[playerid][pBan] == 1)
    {
        format(bdialog, sizeof(bdialog), "You are banned from our server.\nIP: %s\nBanned By: %s\nBan Reason: %s\nForums: "FORUM"", PlayerInfo[playerid][pIP], PlayerInfo[playerid][pBannedBy], PlayerInfo[playerid][pBanReason]);
        ShowPlayerDialog(playerid, DIALOG_BAN, DIALOG_STYLE_MSGBOX, "Ban Info", bdialog, "Close", "");
        Kick(playerid);
        return 1;
    }
}
Ban command is just writting into the file info about the ban & kicking player.
If you need anything else from codes, I will add.
Reply


Messages In This Thread
Ban is not off y_ini - by maximthepain - 19.03.2015, 13:13
Re: Ban is not off y_ini - by Misiur - 19.03.2015, 13:24
Re: Ban is not off y_ini - by maximthepain - 19.03.2015, 13:56
Re: Ban is not off y_ini - by Misiur - 19.03.2015, 14:21
Re: Ban is not off y_ini - by maximthepain - 19.03.2015, 14:29
Re: Ban is not off y_ini - by Misiur - 19.03.2015, 14:53
Re: Ban is not off y_ini - by maximthepain - 19.03.2015, 15:12
Re: Ban is not off y_ini - by Misiur - 19.03.2015, 15:22
Re: Ban is not off y_ini - by maximthepain - 19.03.2015, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)