04.10.2014, 03:13
(
Последний раз редактировалось Uberanwar; 04.10.2014 в 05:42.
)
I have a problem with my ban checking codes, sometimes it kicks players for ban evasion (but actually they're not banned) when they connected to the server
What's the problem?
I do ban check on OnPlayerConnect
SOLVED
What's the problem?
I do ban check on OnPlayerConnect
pawn Код:
GetPlayerIp(playerid, PlayerInfo[playerid][IP], 33);
format(str, sizeof(str),"[IP]: %s (%d) - %s", GetName(playerid), playerid, PlayerInfo[playerid][IP]);
SendAdminMessage(GREY, str);
ResetPlayerCash(playerid);
ResetPlayerWeapons(playerid);
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
if(PlayerInfo[playerid][Banned] == 1)
{
new fstr[156];
format(fstr,sizeof(fstr),"{C0C0C0}[SERVER] {FFFF00}%s (%d) {FFFFFF}has been kicked from the server {FFFF00}- Banned Player",GetName(playerid),playerid);
SendClientMessageToAll(COLOR_WHITE, fstr);
ResetPlayerStats(playerid);
GameTextForPlayer(playerid, "~r~Kicked!", 8000, 5);
SendClientMessage(playerid, COLOR_ERROR, "You have been kicked from the server because your account is banned! Try to do a ban appeal at skcnr.tk");
SetTimerEx("KickPlayer", 300, false, "i", playerid);
}