Doubt Health

Started by Luis_Labarca, Aug 22, 2019, 05:53 AM

Previous topic - Next topic

Luis_Labarca

:o :o
good night friend is there any way to know what amount of health i lost? example I have health at 100 and I fall from a height and it reduces me% 10 health how can I get the result that I lost that %10?

Well, I want to see in a message that I lost 10 health
??? ??? ::)
My server RP
IP: 51.222.28.159:8194

Mack

function onPlayerHealthChange( player, lastHP, newHP )
{
     if ( lastHP > newHP ) MessagePlayer( "You just lost " + ( lastHP - newHP ) + " health.", player );
}

https://wiki.vc-mp.org/wiki/OnPlayerHealthChange

Luis_Labarca

Quote from: Mack on Aug 22, 2019, 06:18 AMfunction onPlayerHealthChange( player, lastHP, newHP )
{
     if ( lastHP > newHP ) MessagePlayer( "You just lost " + ( lastHP - newHP ) + " health.", player );
}

https://wiki.vc-mp.org/wiki/OnPlayerHealthChange

thanks friend ;) ;) ;D ;D
My server RP
IP: 51.222.28.159:8194