19.03.2015, 13:13
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:
Ban command is just writting into the file info about the ban & kicking player.
If you need anything else from codes, I will add.
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;
}
}
If you need anything else from codes, I will add.