07.07.2010, 09:03
A friend made anti-cheat a while ago. I removed it because it was banning random players at connecting. Now I re-created it by myself with help (looking at other anti-cheat systems). And again the same problem, banning some players at connection. Yes, it is working > banning hackers with minigun/heat seaker.
Can someone tell me what's wrong?
pawn Код:
//********************************************Urban Fighters Anti-Cheat********************************************
public weaponCheck(playerid)
{
new wep = GetPlayerWeapon(playerid);
new reason[64], output[128];
if(wep == 36 || wep == 38)
{
switch(wep)
{
case 36: format(reason, sizeof(reason), "Heat Seaker");
case 38: format(reason, sizeof(reason), "Minigun");
}
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(output, sizeof(output), "[UFA-C] %s was caught using forbidden weapon [%s] and was banned.", pName, reason);
SendClientMessageToAll(COLOR_UFAC, output);
format(output, sizeof(output), "[UFA-C] You were caught using forbidden weapon [%s] and you have been banned.", reason);
SendClientMessage(playerid, COLOR_UFAC, output);
TogglePlayerControllable(playerid, false);
Ban(playerid);
}
return 1;
}