Posts: 125
Threads: 10
Joined: May 2011
Reputation:
0
Hello,
I'm scripting now a new repair system for my GM. It's clear for me the way tires and doors work, but... could somebody send me a link or explain the values returned when calling GetVehicleDamageStatus on Lights and Panels?
Thanks and kind regards,
Siralos
Posts: 125
Threads: 10
Joined: May 2011
Reputation:
0
Hello,
What I need to understand is the meaning of these arguments returned by GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires)
The integer to store the panel damage data in, passed by reference.
The integer to store the light damage data in, passed by reference.
If they return, for example: 150... What does that mean in terms of visualization of the car?
Tires and Doors are explained correctly in sa-mp wiki, but not lights or panels.
Thanks in advance and regards,
Siralos
Posts: 930
Threads: 7
Joined: Jul 2010
Reputation:
0
Panels and Lights return 1 if damaged, or 0 if undamaged.
Posts: 2,938
Threads: 162
Joined: May 2010
Quote:
Originally Posted by Siralos
Thanks! So, no distinction among the right or left light; that's what I needed to know.
Regards,
Siralos
|
Yes there is, they are stored in bits
Use this
pawn Code:
encode_lights(light1, light2, light3, light4)
{
return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
}
UpdateVehicleDamageStatus(vehicleid, panels, doors, encode_lights(0, 0, 0, 0), tires);