21.12.2012, 21:36
In my script I have a system that kicks people if they are banned. What it does is kick them if their IP is banned or it Bans them if they login with a banned name. The problem is is that randomly people will join (even me) and it kicks them for logging on with a Banned Name and then bans their IP, whats wrong!
Here is the Ban Code:
Please Please Help me,
Thanks: jakejohnsonusa
Here is the Ban Code:
pawn Код:
format(bancheck, sizeof(bancheck),"LARP/Users/Bans/%s.ban",playersip);
if(dini_Exists(bancheck))
{
ClearChatbox(playerid, 10);
if(!strcmp(dini_Get(bancheck,"BanName"),plname,true))
{
SendClientMessage(playerid, COLOR_NICERED,"=======================================YOU ARE BANNED======================================");
SendClientMessage(playerid, COLOR_LIGHTRED,"This Nickname is banned from this Server, And never was unbanned.");
SendClientMessage(playerid, COLOR_LIGHTRED,"If you wish to be unbanned please visit our website at <jakesroleplay.frmods.com>");
SendClientMessage(playerid, COLOR_LIGHTRED,"Ban Evading will result in a Permanent Range Ban.");
SendClientMessage(playerid, COLOR_NICERED,"=======================================BAN INFORMATION===================================");
format(msg2,sizeof(msg2),"Ban issued by administrator: %s",dini_Get(bancheck,"BannedBy"));
SendClientMessage(playerid, COLOR_WHITE,msg2);
format(msg2,sizeof(msg2),"Ban issued on: %s",dini_Get(bancheck,"BanDate"));
SendClientMessage(playerid, COLOR_WHITE,msg2);
format(msg2,sizeof(msg2),"Ban Reason: %s",dini_Get(bancheck,"BanReason"));
SendClientMessage(playerid, COLOR_WHITE,msg2);
SendClientMessage(playerid, COLOR_NICERED,"========================================YOU ARE BANNED=======================================");
format(msg2,sizeof(msg2),"[ADMIN]: %s (%d), Has been kicked for Possible Ban Evading",plname,playerid);
SendAdminMessage(COLOR_LIGHTRED,msg2);
format(msg2,sizeof(msg2),"(%d/%d/%d) [%d:%d:%d] %s Has been kicked by the anticheat for Possible Ban Evading",d,m,y,h,mi,s,plname);
KickLog(msg2);
OnPlayerUpdateEx(playerid);
SetTimerEx("KickPlayerOut",500,false,"i",playerid);
return 0;
}
else
{
SendClientMessage(playerid, COLOR_NICERED,"=======================================YOU ARE BANNED======================================");
SendClientMessage(playerid, COLOR_LIGHTRED,"This IP Number is banned from this Server, And never was unbanned.");
SendClientMessage(playerid, COLOR_LIGHTRED,"If you wish to be unbanned please visit our website at <frmods.com>");
SendClientMessage(playerid, COLOR_LIGHTRED,"Ban Evading will result in a Permanent Range Ban.");
SendClientMessage(playerid, COLOR_NICERED,"=======================================BAN INFORMATION=====================================");
format(msg2,sizeof(msg2),"Name of the account Banned on the ip %s: %s",playersip, dini_Get(bancheck,"BanName"));
SendClientMessage(playerid, COLOR_WHITE,msg2);
format(msg2,sizeof(msg2),"Ban issued by administrator: %s",dini_Get(bancheck,"BannedBy"));
SendClientMessage(playerid, COLOR_WHITE,msg2);
format(msg2,sizeof(msg2),"Ban issued on date: %s",dini_Get(bancheck,"BanDate"));
SendClientMessage(playerid, COLOR_WHITE,msg2);
format(msg2,sizeof(msg2),"Ban Reason: %s",dini_Get(bancheck,"BanReason"));
SendClientMessage(playerid, COLOR_WHITE,msg2);
SendClientMessage(playerid, COLOR_NICERED,"========================================YOU ARE BANNED=======================================");
format(msg2,sizeof(msg2),"[ADMIN]: %s (%d), Has been kicked for Possible Ban Evading",plname,playerid);
SendAdminMessage(COLOR_LIGHTRED,msg2);
format(msg2,sizeof(msg2),"(%d/%d/%d) [%d:%d:%d] %s Has been kicked by the anticheat for Possible Ban Evading",d,m,y,h,mi,s,plname);
KickLog(msg2);
format(msg2,sizeof(msg2),"LARP/Users/%s.ini",plname);
if(dini_Exists(msg2))
{
dini_IntSet(msg2,"Banned",1);
}
OnPlayerUpdateEx(playerid);
SetTimerEx("KickPlayerOut",500,false,"i",playerid);
return 0;
}
}
Thanks: jakejohnsonusa