Help ant cheat
#1

Help please , Code: Pastebin
Problem: I have a problem when you give a gun ID 10 to the player he is kicked .. Because of the ant cheat
Reply
#2

I guess this probably happens to all weapons with no ammo ? if yes it has something to do with this line
PHP код:
         if(tmp[2] < tmp[4]) { RemoveWeapon(itmp[3]); ACKick(i,"Hack Armas"); } 
This might fix it, as I have no idea how melee weapon ammos are saved
PHP код:
         if(tmp[2] < tmp[4]&&tmp[0]!=10) { RemoveWeapon(itmp[3]); ACKick(i,"Hack Armas"); } 
if this didn't fix it add this line after your getplayerweapondata and show us what it prints on your console
PHP код:
printf("SLOT:%i WeapData:%i pWeapData:%i WeapAData:%i pWeapAData:%i",tmp[0],tmp[1],tmp[3],tmp[2],tmp[4]); 
Reply
#3

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
I guess this probably happens to all weapons with no ammo ? if yes it has something to do with this line
PHP код:
         if(tmp[2] < tmp[4]) { RemoveWeapon(itmp[3]); ACKick(i,"Hack Armas"); } 
This might fix it, as I have no idea how melee weapon ammos are saved
PHP код:
         if(tmp[2] < tmp[4]&&tmp[0]!=10) { RemoveWeapon(itmp[3]); ACKick(i,"Hack Armas"); } 
if this didn't fix it add this line after your getplayerweapondata and show us what it prints on your console
PHP код:
printf("SLOT:%i WeapData:%i pWeapData:%i WeapAData:%i pWeapAData:%i",tmp[0],tmp[1],tmp[3],tmp[2],tmp[4]); 
PHP код:
[09:24:55SLOT:1 WeapData:8 pWeapData:8 WeapAData:1 pWeapAData:1
[09:24:57SLOT:1 WeapData:8 pWeapData:8 WeapAData:1 pWeapAData:1
[09:24:58SLOT:1 WeapData:8 pWeapData:8 WeapAData:1 pWeapAData:1
[09:24:59SLOT:1 WeapData:8 pWeapData:8 WeapAData:1 pWeapAData:1
[09:25:01SLOT:1 WeapData:8 pWeapData:8 WeapAData:1 pWeapAData:1
[09:25:05SLOT:1 WeapData:8 pWeapData:8 WeapAData:1 pWeapAData:1
[09:25:06SLOT:1 WeapData:8 pWeapData:8 WeapAData:1 pWeapAData:1
[09:25:07SLOT:11 WeapData:10 pWeapData:0 WeapAData:1 pWeapAData:0
[09:25:09Mynick has left the server (kick ant cheat
Reply
#4

Oh I found the reason that is happening, you are checking if he have the weap according to your variables, then checking if he doesn't have them, what you should check is what he has, and if he doesn't have it in his variables to kick him.
PHP код:
        if(tmp[3] != tmp[1]) { RemoveWeapon(itmp[3]); ACKick(i,"Hack Armas"); }
        if(
tmp[4] > tmp[2]) { RemoveWeapon(itmp[3]); ACKick(i,"Hack Armas"); } 
Код:
[09:25:07] SLOT:11 WeapData:10 pWeapData:0 WeapAData:1 pWeapAData:0
This means he has weapon id 10 with 1 ammo, but doesn't have it scriptwisely
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)