right floatsqroot vehicle health param?
#1

hello people, since i'm kind noobish with floatsqroot, what should i put as value there:
Код:
final_vehicle_health = floatsqroot(vehicle_health*vehicle_health)*0.1; // veh's health
at the *0.1, if i keep it like this, in game it shows health: 100, but it takes in fire at 25 since cars get in fire at 250 or 249 w/e.. what must i do so it takes in fire at 0 and not at 25?
Reply
#2

A car takes fire when it has vehicle health 249. Black smoke is at 250.
No, this cant be changed.
Reply
#3

yes i know, but i mean so that on my string it shows 0 when it blows...
Reply
#4

bummmmmmmp
Reply
#5

You mean like, something that sets the textdraw to 0 when vehicle has 249 or less?
If thats the case then its not possible.
Reply
#6

that's what i mean, so if it's impossible with floatsqroot, with what can i do it?
Reply
#7

you mean to *0.1 ? if yes it would show health as 75 :\

otherwise i dont know what ur talking about xD
Reply
#8

pawn Код:
new Float:health;

GetVehicleHealth( vehicleid, health );

health = ( health < 250.0 ) ? 0.0 : health - 250.0;

if ( health != 0.0 )
    health = health / 7.5;
(or something like that)
Reply
#9

yea its getting better, but the problem is that it will show 25 health be4 it gets in fire, then sudently go down to 0 :\

you were right, i fixed it with that, thx slice
Reply
#10

adjustedhealth = (health - 250) / 7.5
if(adjustedhealth < 0) adjustedhealth = 0;

should go down smoothly from 100 (full health) to 0 (starts burning).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)