Guest Posted December 1, 2005 Share Posted December 1, 2005 Odd question...Is there a way to obtain the health of the LAST car driven? Is there an equivilent to: $mta.health($1,).vehicle Or: $mta.vehicle($1,).health This is my script in the vehicle exit handler: if ($readini($scriptdir $+ west.ini, isSold, $readini($scriptdir $+ west.ini, LastCar, $mta.name($1,$2))) != 1) { if ($mta.health($1,$2).vehicle >= 40) { mta.msg $1 $2 You could still go and sell that car to Sunshine Autos!!! } } Problem: Once your out of a car, a script cannot access your car's health cause your not in it anymore. Your vehicle is 0 or foot. I know i have used the wrong identifier in the second line, but that is where this question arises. I need to address the vehicle's health so I can see whether it is worth telling them to try sell the car. Cars with health less than 40 aren't accepted by Sunshine's! Link to comment
Si|ent Posted December 1, 2005 Share Posted December 1, 2005 You could just keep a history, a note of each vehicle as its used in an ini. (perhaps only the last three to prevent the file becoming enormous). Then refer to it when required. Link to comment
MrJax Posted December 1, 2005 Share Posted December 1, 2005 Yea you could do that, but it would never be 100%, the server wouldn't know when someone shot at or if it had rollen down a hill n blown up after a player left it Link to comment
Recommended Posts