GetVehicleDamageStatus

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:50, 20 April 2015
Kar (Talk | contribs)

← Previous diff
Revision as of 23:26, 12 May 2015
MP2 (Talk | contribs)

Next diff →
Line 22: Line 22:
printf("Vehicle Status : [Panels] : %d - [Doors] : %d - [Lights] : %d - [Tires] : %d",panels,doors,lights,tires); printf("Vehicle Status : [Panels] : %d - [Doors] : %d - [Lights] : %d - [Tires] : %d",panels,doors,lights,tires);
</pawn> </pawn>
 +
 +{{Tip|For some useful functions for working with vehicle damage values, see [[DamageStatus|here]].}}
{{RelatedFunctions}} {{RelatedFunctions}}

Revision as of 23:26, 12 May 2015



GetVehicleDamageStatus was added in SA-MP 0.3a This Callback was added in SA-MP 0.3a and will not work in earlier versions!


Description:

Retrieve the damage statuses of a vehicle.


Parameters:
(vehicleid, &panels, &doors, &lights, &tires)
vehicleidThe ID of the vehicle to get the damage statuses of.
panelsA variable to store the panel damage data in, passed by reference.
doorsA variable to store the door damage data in, passed by reference.
lightsA variable to store the light damage data in, passed by reference.
tiresA variable to store the tire damage data in, passed by reference.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. This means the vehicle specified does not exist.


Image:32px-Ambox_warning_orange.png

Note

The stored values are bit masks. Bitwise operators will allow you to use the values.


Example Usage:

new panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
printf("Vehicle Status : [Panels] : %d - [Doors] : %d - [Lights] : %d - [Tires] : %d",panels,doors,lights,tires);
Tip

Image:Light_bulb_icon.png

For some useful functions for working with vehicle damage values, see here.


Related Functions

The following functions may be useful, as they are related to this function in one way or another.


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

In other languages