Scripting Help
#1

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
Reply
#2

Try using RemoveVehicleComponent.

https://sampwiki.blast.hk/wiki/RemoveVehicleComponent
https://sampwiki.blast.hk/wiki/Car_Component_ID
Reply
#3

no not this
i mean with
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
Reply
#4

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
Reply
#5

Oh thanks
Reply
#6

anyone know something more this is not helping me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)