SA-MP Forums Archive
[Help] Repairing just a part of a vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Repairing just a part of a vehicle (/showthread.php?tid=477695)



[Help] Repairing just a part of a vehicle - RooK1e - 25.11.2013

Hello,

How would I repair just all tires?
I've tried but I can't fix only tires


Re: [Help] Repairing just a part of a vehicle - Konstantinos - 25.11.2013

https://sampwiki.blast.hk/wiki/UpdateVehicleDamageStatus

https://sampwiki.blast.hk/wiki/TireStates


Re: [Help] Repairing just a part of a vehicle - RooK1e - 25.11.2013

I'm tried but vehicle fully fix


Re: [Help] Repairing just a part of a vehicle - Konstantinos - 25.11.2013

I haven't used that function before, but it should be something like:

pawn Код:
new panels, doors, lights, tires;  
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 0);
// 0 -> all of them inflated tires.
Or by the examples of the tire states:
pawn Код:
new Panels, Doors, Lights, Tires;
GetVehicleDamageStatus(vehicleid), Panels, Doors, Lights, Tires);
// For 4-wheeled vehicles:
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, (Tires | 0b0000));
// For 2-wheeled vehicles (bikes):
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, (Tires | 0b00));



Re: [Help] Repairing just a part of a vehicle - RooK1e - 25.11.2013

Tnx