25.10.2011, 16:12
use https://sampwiki.blast.hk/wiki/GetPlayerHealth
lets say you store the health in the variable x.
the player has 95 heal, so (x is a float...) x = 95.
the prize for healed 100 health is 1000$ so, for 1 hp it's 10$
now you do:
new prize = (100-floatround(x))*10);
we need to floatround so we don't get a float value, but a value with no dots.
lets say you store the health in the variable x.
the player has 95 heal, so (x is a float...) x = 95.
the prize for healed 100 health is 1000$ so, for 1 hp it's 10$
now you do:
new prize = (100-floatround(x))*10);
we need to floatround so we don't get a float value, but a value with no dots.