"UpdateVehicleDamageStatus();" To blow car parts off?
#1

So I heard about UpdateVehicleDamageStatus(); so when you type a command a car parts flies off. What I want is that when i type /removedoors it pops out every door or any other car part from the car like /trunk on ls-rp.
And I don't really know how to do it. Any ideas?
Didn't find anything trough "Search"
Reply
#2

pawn Код:
new panel,doors,lights,tires;
GetVehicleDamageStatus(vehicleid,panel,doors,lights,tires);
UpdateVehicleDamageStatus(vehicleid,panel,1,lights,tires);
Or something like that, I'm not sure about damage values.
Reply
#3

Try this:

pawn Код:
new panels, doors, lights, tires;
And the command

pawn Код:
if (strcmp("/door", cmdtext, true, 10) == 0)
{
   
        UpdateVehicleDamageStatus(vehicleid, panels, 1, lights, tires); //1 should work
        return 1;
}
Just edit whats in the parenthesese. I recommend since I don't have much knowledge with this I would test around and put in some numbers in the door part. For full popped wheels is 15.
Reply
#4

For the doors, i think you will have to be careful not to cause a crash with 2 door cars if it's trying to pop off all of the doors.
Reply
#5

On the wiki is a nice Example.

Click Here To View the Example
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)