Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: Luis_Labarca on Aug 22, 2019, 05:53 AM

Title: Doubt Health
Post by: Luis_Labarca on Aug 22, 2019, 05:53 AM
: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
??? ??? ::)
Title: Re: Doubt Health
Post by: Mack on Aug 22, 2019, 06:18 AM
function onPlayerHealthChange( player, lastHP, newHP )
{
     if ( lastHP > newHP ) MessagePlayer( "You just lost " + ( lastHP - newHP ) + " health.", player );
}

https://wiki.vc-mp.org/wiki/OnPlayerHealthChange
Title: Re: Doubt Health
Post by: Luis_Labarca on Aug 22, 2019, 01:52 PM
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