Removing all components
#1

How can I remove all components from car like this function
https://sampwiki.blast.hk/wiki/RemoveVehicleComponent
But all components... from 1 to 99999
Reply
#2

That's for removing components like nitro and such.
Reply
#3

pawn Код:
new componentid;

for (new i; i < 14; i++)
{
    componentid = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), i);
    if (componentid != 0)
        RemoveVehicleComponent(GetPlayerVehicleID(playerid), componentid);
}
That should do it.
It checks every component slot for a component-id.
If there is one installed, componentid will not be 0 and the component will be removed from the player's vehicle.
Reply
#4

Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)