Ban problem..
#1

Hi all, I have "fast" question, I scripted this simple weapon anitcheat,
Quote:

public anticheat()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerWeapon(i) == 36 || GetPlayerWeapon(i) == 37)
{
new pname[MAX_PLAYER_NAME];
new string[124];
GetPlayerName(i, pname, sizeof(pname));
format(string, sizeof(string), " %s has been banned! Reason: Forbidden weapon", pname);
SendClientMessageToAll(COLOR,string);
BanEx(i,string);
}
}
return 1;
}

It works, but, the next player who joins the server with ID of banned player get banned to, Im not sure why..
There is few ways to solve this, for example this simple code << if(Spawned[i] == 0) return 1;>> this check if player is spawned, if not it wont be banned. Im not sure what is wrong with this..?
Reply


Messages In This Thread
Ban problem.. - by Unknownich - 16.12.2011, 18:03
Re: Ban problem.. - by GamingTurf - 16.12.2011, 18:08
Re: Ban problem.. - by Unknownich - 16.12.2011, 18:12

Forum Jump:


Users browsing this thread: 1 Guest(s)