Binary/Bits stuff for tire popping
#1

This is something I really need to learn..

This code makes the back two tires pop:

pawn Код:
GetVehicleDamageStatus(vehicleid, Panels, Doors, Lights, Tires);
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, 1 | (0 << 1) | (1 << 2) | (0 << 3));
But the problem is, it makes the front two NOT popped - repairing them if they are already popped. How do I make it so it keeps any others popped?

https://sampwiki.blast.hk/wiki/TireStates
Reply
#2

pawn Код:
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, (Tires | 0b0101));
That should work.
Reply
#3

Aha! Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)