SA-MP Forums Archive
Problem with max Health - 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: Problem with max Health (/showthread.php?tid=324005)



Problem with max Health - Petricko - 07.03.2012

For someone that we can say that I choose to be 100 max Health, for example, when someone takes the juice to drink and sing it to the full HP to 360, or buy in Burg eg burger two times it is 200 HP, I think to understand me.
Thanks in advance.


Re: Problem with max Health - Petricko - 07.03.2012

Please someone help me.


Re: Problem with max Health - IstuntmanI - 07.03.2012

Don't make 2xPosts, wait !

Код:
public OnPlayerUpdate( playerid )
{
    new Float:lfHealth;
    GetPlayerHealth( playerid, lfHealth );
    if( lfHealth > 100.0 )
        SetPlayerHealth( playerid, 100.0 );

    return 1;
}