Scripting Help - 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)
+--- Thread: Scripting Help (
/showthread.php?tid=523212)
Scripting Help -
Toxik - 01.07.2014
Hello dear scripters!
i hope u can help me!
Is there any way for make dors fall off on all cars in my GM ?
please fast replays i need it so fast
Re: Scripting Help -
eXeDev - 01.07.2014
Try using RemoveVehicleComponent.
https://sampwiki.blast.hk/wiki/RemoveVehicleComponent
https://sampwiki.blast.hk/wiki/Car_Component_ID
Re: Scripting Help -
Toxik - 05.07.2014
no not this
i mean with
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
Re: Scripting Help -
Dignity - 05.07.2014
From the wiki:
pawn Код:
new panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15); //Setting tires to 15 will pop them all
Refer to this for door states:
https://sampwiki.blast.hk/wiki/UpdateVehicleDamageStatus
https://sampwiki.blast.hk/wiki/DoorStates
And thanks to Sasino (who posted this in another thread relevant to this one):
pawn Код:
UpdateVehicleDamageStatus(vehicleid, panels, 0b00100000, lights, tires);
So your code would be this:
pawn Код:
#include <a_samp>
native IsValidVehicle(vehicleid);
#include <zcmd>
CMD:states(playerid, params[])
{
new panels, doors, lights, tires;
for(new i; i < MAX_VEHICLES; i ++)
{
if(IsValidVehicle(i))
{
GetVehicleDamageStatus(i, panels, doors, lights, tires);
UpdateVehicleDamageStatus(i, panels, 0b00100000, lights, tires);
}
}
return true;
}
If you decide to change the above, please keep this in mind:
https://sampwiki.blast.hk/wiki/IsValidVehicle
Re: Scripting Help -
Toxik - 22.07.2014
Oh thanks
Re: Scripting Help -
Toxik - 01.08.2014
anyone know something more this is not helping me