SA-MP Forums Archive
[FilterScript] [FS] Tune all vehicle model types in one modshop - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS] Tune all vehicle model types in one modshop (/showthread.php?tid=108422)



[FS] Tune all vehicle model types in one modshop - Rafael[BR] - 14.11.2009

- 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:

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 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:

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]);
}
Then you need to use ChangeVehicleColorEx instead of ChangeVehicleColor.

Add your modshops in the array TuningLocations:
Code:
new Float:TuningLocations[][3] = {
	{1653.8280, -1837.3652, 14.0000},
	{-2037.2894, 178.4451, 28.8359}
};
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!



Re: [FS] Tune all vehicle model types in one modshop - [BR]Michael - 14.11.2009

Good


Re: [FS] Tune all vehicle model types in one modshop - Marshew_DD - 14.11.2009

This is Fantatic!!!! Ideal for RP Servers! Very good, and big work!


Re: [FS] Tune all vehicle model types in one modshop - Rafael[BR] - 14.11.2009

Thanks!


Re: [FS] Tune all vehicle model types in one modshop - NeRoSiS - 15.11.2009

Now this is amazing, does it really work with all vehicles?

If so, nice work, i'll test it later on.


Re: [FS] Tune all vehicle model types in one modshop - Ventania - 15.11.2009

Good job!


Re : [FS] Tune all vehicle model types in one modshop - Shidony - 13.02.2011

is it possible to make the tuning save with this FS ?


Re: [FS] Tune all vehicle model types in one modshop - WebScript.Biz - 13.02.2011

Shidony, it can be helpful for me too...
Rafael[BR], that is cool FS, but in next version you should do a saving system for tuned cars


Re: [FS] Tune all vehicle model types in one modshop - Stunt_Guy - 13.02.2011

Very Good .. !!

KEEP UP !


Re: [FS] Tune all vehicle model types in one modshop - Loading... - 20.06.2011

question witch mod shop is it for this fs


Re: [FS] Tune all vehicle model types in one modshop - BASITJALIL - 20.06.2011

WOW nice work buddy


Respuesta: [FS] Tune all vehicle model types in one modshop - clavador - 22.07.2011

Wow!

I was about to do this script myself for my server and then I saw this. Very impressive.

Quite a work you putted here. Congratulations for an amazing script.