Quote:
Originally Posted by Pandabeer1337
Quote:
Originally Posted by tr0y
pawn Код:
public Antiweapon(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { if (GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36) { format(string, sizeof(string), "%s has been kicked for cheating", playername); SendClientMessageToAll(ADMIN_RED, string); banning[i] = 1; if(banning[i] == 1) { Kick(i); } return 1; } } }
The problem is it kicks the first player on connect, after one player get's kicked by the anti-cheat, probably if the ID is the same. I also reset the banning variable to 0 on connect.
Anyone know what's wrong? ![confused](images/smilies/confused.gif)
|
remove the banning variable its a waste of cells, you can just kick the dude you dont need to have an useless variable decide if he needs to be kicked.
|
I know, It's not needed, but the first player connecting keeps getting kicked, I taught reseting that variable on connect would fix the problem.
EDIT: Do I also need a loop, when doing SetTimerEx?