OnPlayerTakeDamage doesn't work?
#1

Hello,

At my OnPlayerTakeDamage I have got this:

pawn Код:
if(weaponid == 24) //deagle
            {
                if(armour > 0)
                {
                    pDamage[playerid] += 15;
                }
                else
                {
                    pDamage[playerid] += 30;
                }
            }
and below that:
pawn Код:
if(pDamage[playerid] > 0)
            {
                pDamageTimer[playerid] = 120;
                GameTextForPlayer(playerid, "~r~You've been hit!", 1500, 1);
                if(pDamage[playerid] >= 100)
                {
                    format(string, sizeof(string), "* %s falls to the ground due to the bullet injuries.", GetPlayerNameEx(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
                }
               
               
            }
But the effect (the messages, etc) isn't triggered. Is there anything I do wrong in here?
Reply


Messages In This Thread
OnPlayerTakeDamage doesn't work? - by Mado - 08.02.2013, 17:02
Re: OnPlayerTakeDamage doesn't work? - by Alternative112 - 08.02.2013, 17:54
Re: OnPlayerTakeDamage doesn't work? - by Mado - 08.02.2013, 21:30
Re: OnPlayerTakeDamage doesn't work? - by Mado - 10.02.2013, 15:11
Re: OnPlayerTakeDamage doesn't work? - by Mado - 11.02.2013, 19:07
Re: OnPlayerTakeDamage doesn't work? - by MP2 - 11.02.2013, 19:09
Re: OnPlayerTakeDamage doesn't work? - by Mado - 11.02.2013, 19:38
Re: OnPlayerTakeDamage doesn't work? - by DaRk_RaiN - 11.02.2013, 20:00
Re: OnPlayerTakeDamage doesn't work? - by Mado - 12.02.2013, 06:42
Re: OnPlayerTakeDamage doesn't work? - by Mado - 13.02.2013, 05:21

Forum Jump:


Users browsing this thread: 4 Guest(s)