bug Increase Damage HP/ARMOR back sometimes
#1

Hello guys, i have a problem with my damage modified.

The Hp/Armor back sometimes, i understand why.

Look this video with TEC9 damage modified +2 (8 DMG/HIT):
[ame]http://www.youtube.com/watch?v=NZ9q-vcFVhg[/ame]

My calcul

PHP код:
if(GetPlayerTeam(issuerid) != GetPlayerTeam(playerid))
        {
               if(
weaponid == 22 || weaponid == 33 || weaponid == 28 || weaponid == 32 || weaponid == 34 || weaponid == 15 || weaponid == || weaponid == 4)
            {
                   if(!
OnPlayerAnimButtGun(issuerid,weaponid))
                 {
                        switch(
weaponid)
                           {
                               case 
22amount 18.0;
                            case 
15amount 12.0;
                            case 
4amount 40.0;
                            case 
5amount 12.0;
                            case 
28amount 8.0;
                            case 
32amount 9.0;
                            case 
33amount 40.0;
                            case 
34amount 50.0;
                        }
                         
armour armour amount;
                        if(
armour 0.0)
                        {
                              
health += armour;
                             if(
health <= 0.0)
                             {
                                
health 0.0;
                               }
                            
armour 0.0;
                         }
                         
SetPlayerHealthTakeDamage(playerid,health);
                         
SetPlayerArmourTakeDamage(playerid,armour);
                }
            }
        } 
Reply
#2

I cannot watch it from ipad can you give me another link
Reply
#3

Try http://*********/NZ9q-vcFVhg
Reply
#4

Nobody had this bug?
Reply
#5

can you explain better whats going on here? I watch a video were a pizza boy gets killed and some messages, which I cannot read, show up on taking damage.
Reply
#6

This video shows sometimes life or armor back. Do not worry about the texts.
We filmed in slow motion to better see the bug because the quality is bad sorry...

Look several these sequences

1)First back, 7sec - 8sec Armor back
2)Second 10sec - 11sec HP back

It seems the script did not have the time to SetPlayerHealth / Armour by the speed of certain weapons.

In this video you see this bug just 2 times but we were only 3 so imagine with 20 players. Apparently more the player have ping more there may be this bug.
Reply
#7

So you use this code to give to the player a part of the damage he sustained, back, am I right? But you use many functions that are not included in the a_samp.inc and i don;t know how they work, like OnPlayerAnimButtGun and SetPlayerHealthTakeDamage(playerid,health);
SetPlayerArmourTakeDamage(playerid,armour);
Reply
#8

Yes you are right,

'OnPlayerAnimButtGun' its for Detect Weapon Butt Attack

PHP код:
OnPlayerAnimButtGun(issuerid,weapondid)
{
    if(
weapondid 15 && weapondid != 34// > weapon cold steel && Dont need for sniper
    
{
        if(
GetPlayerAnimationIndex(issuerid) == 1167 || GetPlayerAnimationIndex(issuerid) == 1166 || GetPlayerAnimationIndex(issuerid) == 1165) return 1;
    }
    return 
0;

And "SetPlayerHealthTakeDamage"
PHP код:
SetPlayerHealthTakeDamage(playeridFloat:health)
{
    
OPUHealth[playerid] = health;
    return 
SetPlayerHealth(playeridhealth);

On my system damage modified Health = OPUHealth[playerid] just for update my variable.

Have you used an damage modified? I do not know if this is a popular bug
Reply
#9

I have this bug, but appearantly it's just from lag....
Reply
#10

Arf thanks, There is no way to fix it? I attenuated the bug i create a calculation health and armour without OnPlayerUpdate and without GetPlayerHealth/Armour beacause GetPlayerHealth or Armour is very bad on OnPlayerTakeDamage
source MP2: https://sampforum.blast.hk/showthread.php?tid=414939

With my system when the Health back exemply, the next hit puts in the right place the health if he dont back also...
But it is not perfectly
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)