18.06.2013, 16:32
Hello,
My anticheat keeps banning people who have been tased...
At the "TaserClear" Public, it sets the Tased to 0
My anticheat keeps banning people who have been tased...
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if(Player[Shooter][HasTaser] == 1)
{
if(GetPlayerWeapon(Shooter) == 23)
{
Player[Target][Tased] = 1;
new Float: PHealth;
GetPlayerHealth(Target, PHealth);
Player[Target][Health] = PHealth+HealthLost;
SetPlayerHealth(Target, PHealth+HealthLost);
TogglePlayerControllable(Target, false);
ApplyAnimation(Target, "CRACK", "crckidle4", 4.0, 1, 0, 0, 0, 0);
SetTimerEx("TaserClear",7000,false,"d",Target);
}
}
return 1;
}
pawn Код:
public AntiCheat()
{
foreach(Player, i)
{
if(Authenticated[i] == 1)
{
if(Player[i][AntiCheatExemption] == 0)
{
new PMoney = GetPlayerMoney(i);
new Float: PArmour; GetPlayerArmour(i, PArmour);
new Float: PHealth; GetPlayerHealth(i, PHealth);
if(PMoney > Player[i][Money]){ServerBan(i, "Money Hack");}
if(Player[i][Tased] == 0)
{
if(PArmour > Player[i][Armour]){ServerBan(i, "Armour Hack");}
if(PHealth > Player[i][Health]){ServerBan(i, "Health Hack");}
}