This is a filterscript for server side mod shops. It requires Incognito's stream plugin for the use of dynamic checkpoints. There are pros and cons to using scripted mod shops:
Pros:
- Most land vehicles can be modded
- Front/rear bumpers AND front/rear bullbars can be applied together
- All wheels are listed for all moddable vehicles
- You can change the paintjob of Camper
- As all valid components are stored for each vehicle model, OnVehicleMod filters out any invalid components added through hacks
Cons:
- You can't choose the vehicle color, though you can still Respray the vehicle to the next default color
Notes:
- OnVehicleRespray2(playerid, vehicleid, color1, color) , OnVehiclePaintjob2(playerid, vehicleid, paintjobid) , and OnVehicleMod2(playerid, vehicleid, componentid) are called through all scripts when you respray, buy a paintjob, or buy a component.
- You might want to move the following into an include if you're restoring paintjobs/components in other scripts:
as well as AddVehicleComponent2, RemoveVehicleComponent2, and the vehiclemodinfo array.
- When destroying a vehicle (DestroyVehicle) you should reset the paintjob/components. Example:
Download - click
Pros:
- Most land vehicles can be modded
- Front/rear bumpers AND front/rear bullbars can be applied together
- All wheels are listed for all moddable vehicles
- You can change the paintjob of Camper
- As all valid components are stored for each vehicle model, OnVehicleMod filters out any invalid components added through hacks
Cons:
- You can't choose the vehicle color, though you can still Respray the vehicle to the next default color
Notes:
- OnVehicleRespray2(playerid, vehicleid, color1, color) , OnVehiclePaintjob2(playerid, vehicleid, paintjobid) , and OnVehicleMod2(playerid, vehicleid, componentid) are called through all scripts when you respray, buy a paintjob, or buy a component.
- You might want to move the following into an include if you're restoring paintjobs/components in other scripts:
Code:
new vpaintjob[MAX_VEHICLES] = {3, ...};
new vcompids[MAX_VEHICLES][MAX_COMPONENT_TYPES];
- When destroying a vehicle (DestroyVehicle) you should reset the paintjob/components. Example:
Code:
vpaintjob[vehicleid-1] = 3;
for (new c = 0; c < MAX_COMPONENT_TYPES; c++)
{
vcompids[vehicleid-1][c] = 0;
}