Remove vehicle doors
#1

Hello there,

I'm looking for someone that can explain me how I can remove a vehicle door. I have seen numerous tutorials and threads about removing door vehicles but didn't really understood it due the byte codes (??). It would be greatly appreciated if someone can help me out as it's quite urgent. I'm going to hand out a special reputation for the one that helps me out with this.

Thanks in advance.
Reply
#2

https://sampwiki.blast.hk/wiki/UpdateVehicleDamageStatus
Reply
#3

pawn Код:
new panels,doors,lights,tires;
GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
doors = encode_doors(4, 4, 4, 4, 0, 0);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);



encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door)
{
    #pragma unused behind_driver_door
    #pragma unused behind_passenger_door
    return bonnet | (boot << 8) | (driver_door << 16) | (passenger_door << 24);
}
Reply
#4

Quote:
Originally Posted by Dragony92
Посмотреть сообщение
pawn Код:
new panels,doors,lights,tires;
GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
doors = encode_doors(4, 4, 4, 4, 0, 0);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);



encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door)
{
    #pragma unused behind_driver_door
    #pragma unused behind_passenger_door
    return bonnet | (boot << 8) | (driver_door << 16) | (passenger_door << 24);
}
This is not gonna work instead of making it higher you lower it, im not 100 percent sure on how to do this but the UpdateVehicleDamageStatus function got something to do with it.
Reply
#5

Should I add that piece of code in the command so it works or do I need to take information from them?
Reply
#6

In command or whereever you want...
pawn Код:
new panels,doors,lights,tires;
GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
doors = encode_doors(4, 4, 4, 4, 0, 0);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);

function
pawn Код:
encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door)
{
    #pragma unused behind_driver_door
    #pragma unused behind_passenger_door
    return bonnet | (boot << 8) | (driver_door << 16) | (passenger_door << 24);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)