help with a bug (fight style)
#1

Hello, i have an anticheat system for damage fake on my server (in OnPlayerGiveDamage).

But when a player have FIGHT_STYLE_KNEEHEAD sometimes get kicked when he give a loot of dmg. Bdw, i have this condition (amount != 54.12), but the damage is 54.12 and he still get kicked.
https://i.imgur.com/DjZE7Zf.png

How can i fix?

take a look here: https://pastebin.com/iXWZxyug

max dmg for fist I have 10.0 + 2.5 in OnPlayerGiveDamage
Reply
#2

Quote:
Originally Posted by None1337
Посмотреть сообщение
Hello, i have an anticheat system for damage fake on my server (in OnPlayerGiveDamage).

But when a player have FIGHT_STYLE_KNEEHEAD sometimes get kicked when he give a loot of dmg. Bdw, i have this condition (amount != 54.12), but the damage is 54.12 and he still get kicked.
https://i.imgur.com/DjZE7Zf.png

How can i fix?

take a look here: https://pastebin.com/iXWZxyug

max dmg for fist I have 10.0 + 2.5 in OnPlayerGiveDamage
Seems the damage is not exactly 54.12. Be less precise in your condition (± 1.0).
Reply
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Seems the damage is not exactly 54.12. Be less precise in your condition (± 1.0).
i don t understand, should I add more +1.0 or less?
Reply
#4

Quote:
Originally Posted by None1337
Посмотреть сообщение
i don t understand, should I add more +1.0 or less?
Something like..
PHP код:
if(amount weapon_max_damage[weaponid]+2.5 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
                if(
weaponid == && !(55.12 <= amount <= 53.12)) {
                    
SCMF(playerid, -1"You were kicked for dmg cheats (%.2f) with %s."amountwname);
                    
KickEx(playerid);
                    return 
0;
                }
            } 
Reply
#5

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Something like..
PHP код:
if(amount weapon_max_damage[weaponid]+2.5 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
                if(
weaponid == && !(55.12 <= amount <= 53.12)) {
                    
SCMF(playerid, -1"You were kicked for dmg cheats (%.2f) with %s."amountwname);
                    
KickEx(playerid);
                    return 
0;
                }
            } 
I still get kick.
Reply
#6

Quote:
Originally Posted by None1337
Посмотреть сообщение
I still get kick.
Well, print the weaponid in your message instead of his name.
Reply
#7

My bad, sorry. Try this:
PHP код:
if(amount weapon_max_damage[weaponid]+2.5 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
                if(
weaponid == && !(55.12 >= amount >= 53.12)) {
                    
SCMF(playerid, -1"You were kicked for dmg cheats (%.2f) with %s."amountwname);
                    
KickEx(playerid);
                    return 
0;
                }
            } 
Reply
#8

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
My bad, sorry. Try this:
PHP код:
if(amount weapon_max_damage[weaponid]+2.5 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
                if(
weaponid == && !(55.12 >= amount >= 53.12)) {
                    
SCMF(playerid, -1"You were kicked for dmg cheats (%.2f) with %s."amountwname);
                    
KickEx(playerid);
                    return 
0;
                }
            } 
I still get kicked...
Reply
#9

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)