SA-MP Forums Archive
Help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help! (/showthread.php?tid=622762)



Help! - StrikerZ - 26.11.2016

In the callback OnPlayerTakeDamage. The amount of damage of armour and health is combined so can i get them seperately the amount of health and armour?


Re: Help! - StrikerZ - 26.11.2016

Anyone?


Re: Help! - StrikerZ - 27.11.2016

Bump


Re: Help! - Alvitr - 27.11.2016

umm...

if me, i will do this:

check weapon id first to detect how player got damage,
like id 54 is fall down and splat,
and else something for more exact.
if is 54 then probily is health damage.

and next just get player armour if > 0.0,
check more exact like

PHP код:
new Float:armour;
GetPlayerArmour(playeridarmour);
if(
armour 0.0)
{
    if(
armour >= amount)
    {
        
//full of Armour amount
    
}
    else
    {
        
//amount > Armour had
    
}
}
else
{
    
//health amount

but i dont know it can work or not x___x
sorry about that.


Re: Help! - StrikerZ - 27.11.2016

Solved