14.11.2009, 00:28
- About -
This filterscript is for you to "create" modshops that can modify all types of vehicles available in SA:MP
You can edit this filterscript, put in your gamemode, adapt to it, etc...
When you use it, 2 callbacks are made:
The first callback you can use to save the components in a vehicle.
The second exists because when the paintjob of vehicle was removed, the vehicle colors are set to 0, to solve this problem, you can do:
Then you need to use ChangeVehicleColorEx instead of ChangeVehicleColor.
Add your modshops in the array TuningLocations:
Just add the position to array.
- Screenshots -
/imageshack/i/samp006dr.png/
/imageshack/i/samp007mx.png/
/imageshack/i/samp008ei.png/
/imageshack/i/samp009o.png/
/imageshack/i/samp010y.png/
- Download -
Rapidshare: http://rapidshare.com/files/32127635...cript.rar.html
Pastebin: http://pastebin.com/f7f9197ff
This is it, people... Sorry for my bad english!
This filterscript is for you to "create" modshops that can modify all types of vehicles available in SA:MP
You can edit this filterscript, put in your gamemode, adapt to it, etc...
When you use it, 2 callbacks are made:
Code:
//Don't forget to add the forwards forward OnVehicleTuned(vehicleid, componentid, slot); forward OnVehicleRemovePaintjob(vehicleid); public OnVehicleTuned(vehicleid, componentid, slot) { } public OnVehicleRemovePaintjob(vehicleid) { }
The second exists because when the paintjob of vehicle was removed, the vehicle colors are set to 0, to solve this problem, you can do:
Code:
forward OnVehicleRemovePaintjob(vehicleid); new VehicleColors[MAX_VEHICLES][2]; stock ChangeVehicleColorEx(vehicleid, color1, color2) { VehicleColors[vehicleid][0] = color1; VehicleColors[vehicleid][1] = color2; ChangeVehicleColor(vehicleid, color1, color2); } public OnVehicleRemovePaintjob(vehicleid) { ChangeVehicleColor(vehicleid, VehicleColors[vehicleid][0], VehicleColors[vehicleid][1]); }
Add your modshops in the array TuningLocations:
Code:
new Float:TuningLocations[][3] = { {1653.8280, -1837.3652, 14.0000}, {-2037.2894, 178.4451, 28.8359} };
- Screenshots -
/imageshack/i/samp006dr.png/
/imageshack/i/samp007mx.png/
/imageshack/i/samp008ei.png/
/imageshack/i/samp009o.png/
/imageshack/i/samp010y.png/
- Download -
Rapidshare: http://rapidshare.com/files/32127635...cript.rar.html
Pastebin: http://pastebin.com/f7f9197ff
This is it, people... Sorry for my bad english!