[FilterScript] [FS] Tune all vehicle model types in one modshop
#1

- 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!
Reply
#2

Good
Reply
#3

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

Thanks!
Reply
#5

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

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

Good job!
Reply
#7

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

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
Reply
#9

Very Good .. !!

KEEP UP !
Reply
#10

question witch mod shop is it for this fs
Reply
#11

WOW nice work buddy
Reply
#12

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)