SA-MP Forums Archive
"UpdateVehicleDamageStatus();" To blow car parts off? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: "UpdateVehicleDamageStatus();" To blow car parts off? (/showthread.php?tid=158286)



"UpdateVehicleDamageStatus();" To blow car parts off? - Majataka - 09.07.2010

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"


Re: "UpdateVehicleDamageStatus();" To blow car parts off? - Hiddos - 09.07.2010

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.


Re: "UpdateVehicleDamageStatus();" To blow car parts off? - ToPhrESH - 09.07.2010

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.


Re: "UpdateVehicleDamageStatus();" To blow car parts off? - jonrb - 09.07.2010

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.


Re: "UpdateVehicleDamageStatus();" To blow car parts off? - Micko9 - 09.07.2010

On the wiki is a nice Example.

Click Here To View the Example