12.09.2011, 03:19
Took from SA-MP wiki. (https://sampwiki.blast.hk/wiki/DoorStates)
And taking the example from SA-MP wiki.(https://sampwiki.blast.hk/wiki/UpdateVehicleDamageStatus)
And editing it..
NOTE: I never used that function, or any type of those, so i dont know if it works. Not tested.
Good luck, Dr.
Quote:
The damage of each door (note that the hood and the trunk are also doors) |
Quote:
Which byte stores what? The first byte stores the state of the hood The second byte stores the state of the trunk The third byte stores the state of the drivers door The fourth byte stores the state of the co-drivers door The states of the 2 rear doors cannot be handled by GetVehicleDamageStatus and UpdateVehicleDamageStatus. Notice that I count the bytes from behind - so the first is the rightmost byte |
pawn Код:
new panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15); //Setting tires to 15 will pop them all
pawn Код:
new panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
UpdateVehicleDamageStatus(vehicleid, panels, 15, lights, tires); //If you set tires to 15 to pop them, i think they are used to destroy a part of the vehicle also.
Good luck, Dr.