Posts: 6,129
Threads: 36
Joined: Jan 2009
Yes, it's very possible.
pawn Код:
CMD:untunemycar(playerid, params[]) {
for(new i = 0; i < 14; i++){
RemoveVehicleComponent(GetPlayerVehicleID(playerid), GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), i));
}
return 1;
}
Posts: 290
Threads: 58
Joined: Nov 2010
Reputation:
0
Nope that didn't work, it removed the tunings but when the vehicles got respawned it was back.
EDIT: Didnt even remove the tuning colors
Posts: 6,129
Threads: 36
Joined: Jan 2009
"Tunings" as you say are removed from a vehicle when it is destroyed (not despawned), so some code in your script is probably working against the code and respawning the mods when the car respawns.
Show us some example code with your vehicle mods, like when a vehicle spawns - show us the code used to spawn a vehicle (presumably for a player).
Posts: 6,129
Threads: 36
Joined: Jan 2009
I'm not downloading 17.9mb just to get a function from you. Try read my post properly, or pastebin your script.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Yes, that's the code.
pawn Код:
CMD:untunemycar(playerid, params[]) {
new
vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == 0)
return SendClientMessage(playerid, 0, "Invalid vehicle ID");
for(new i = 0; i < 14; i++){
RemoveVehicleComponent(vehicleid, GetVehicleComponentInSlot(vehicleid, i));
}
VehicleInfo[vehicleid][mod1] = 0;
VehicleInfo[vehicleid][mod2] = 0;
VehicleInfo[vehicleid][mod3] = 0;
VehicleInfo[vehicleid][mod4] = 0;
VehicleInfo[vehicleid][mod5] = 0;
VehicleInfo[vehicleid][mod6] = 0;
VehicleInfo[vehicleid][mod7] = 0;
VehicleInfo[vehicleid][mod8] = 0;
VehicleInfo[vehicleid][mod9] = 0;
VehicleInfo[vehicleid][mod10] = 0;
VehicleInfo[vehicleid][mod11] = 0;
VehicleInfo[vehicleid][mod12] = 0;
VehicleInfo[vehicleid][mod13] = 0;
VehicleInfo[vehicleid][mod14] = 0;
VehicleInfo[vehicleid][mod15] = 0;
VehicleInfo[vehicleid][mod16] = 0;
VehicleInfo[vehicleid][mod17] = 0;
VehicleInfo[vehicleid][paintjob] = -1;
VehicleInfo[vehicleid][color_2] = -1;
VehicleInfo[vehicleid][color_1] = -1;
return 1;
}