Saving Tyre States - How does this work? -
Dokins - 13.04.2016
pawn Code:
new Panels, Doors, Lights, Tires;
GetVehicleDamageStatus(vehicleid, Panels, Doors, Lights, Tires);
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, (Tires | 0b0101));
This is the example given.
Take for instance, that I wanted to 'slash' a tyre in game.
It would have to check the state of the tyres first, so as to not 'repair' a tyre when bursting another.
So how would I keep the other tyres the same if for instance I chose to burst the back left tyre?
Thanks.
Re: Saving Tyre States - How does this work? -
Godey - 13.04.2016
Here dude
https://sampwiki.blast.hk/wiki/TireStates
Re: Saving Tyre States - How does this work? -
Dokins - 13.04.2016
I checked that but its hard to understand
Re: Saving Tyre States - How does this work? -
Godey - 13.04.2016
Code:
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, 1); // back right
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, 2); // front right
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, 4); // back left
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, 8); // front left
Easy?
Re: Saving Tyre States - How does this work? -
Konstantinos - 13.04.2016
The above will repair the rest of the tires something Dokins doesn't want to. You can use something like this:
pawn Code:
enum Tire_States
{
NONE,
BR,
FR,
FR_BR,
BL,
BL_BR,
FR_BL,
FR_BL_BR,
FL,
FL_BR,
FL_FR,
FL_FR_BR,
FL_BL,
FL_BL_BR,
FL_FR_BL,
ALL
};
F=Front,B=Back,L=Left,R=Right, ALL and combination of the previous for popped tires and NONE for inflated tires.
and then do:
That will keep the same the other tires and pop back left.
Re: Saving Tyre States - How does this work? -
Dokins - 13.04.2016
Ahhh! I see how that works now. I understand.
Thanks a lot Konstantinos, I appreciate it a lot