SA-MP Forums Archive
Filterscipt for Objects and Vehicles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Filterscipt for Objects and Vehicles (/showthread.php?tid=137482)



Filterscipt for Objects and Vehicles - Bob_Mars - 28.03.2010

Hey guys, I was wondering if anyone had the format for a filterscript for objects and vehicles. I hate putting them in the Game Mode file. Also I hate having to restart my server for it to show, so with fs i can do /rcon reloadfs objectscars


Re: Filterscipt for Objects and Vehicles - tpimp - 28.03.2010

Yes.


Re: Filterscipt for Objects and Vehicles - Bob_Mars - 29.03.2010

Quote:
Originally Posted by Tpimp
Yes.
I know it's possible, but I don't know how to do it.


Re: Filterscipt for Objects and Vehicles - Babul - 29.03.2010

heres a small FS:
Код:
#include <a_samp>
new Vehicles;
new Veh[100];
public OnFilterScriptInit()
{
	new c=0;
// Los Santos - Star Tower
	Veh[c]=AddStaticVehicle(488,1554.9250,-1366.0380,329.6352,1.0638,1,1);c++; // LS_StarTower_SanMaverick1
	Veh[c]=AddStaticVehicle(488,1535.4080,-1365.0869,329.6288,359.8693,1,1);c++; // LS_SStarTower_SanMaverick2
	Veh[c]=AddStaticVehicle(487,1528.9988,-1357.9536,329.6360,278.4571,1,1);c++; // LS_StarTower_Maverick1
	Veh[c]=AddStaticVehicle(487,1530.7854,-1349.0416,329.6349,235.6700,1,1);c++; // LS_StarTower_Maverick2
	Veh[c]=AddStaticVehicle(487,1557.7360,-1349.1145,329.6372,115.9586,1,1);c++; // LS_StarTower_Maverick3
	Veh[c]=AddStaticVehicle(487,1559.9283,-1358.0702,329.6335,82.0040,1,1);c++; // LS_StarTower_Maverick4
	Veh[c]=AddStaticVehicle(497,1549.9564,-1342.6866,329.6367,157.9909,1,0);c++; // LS_StarTower_CopMaverick1
	Veh[c]=AddStaticVehicle(497,1539.5828,-1342.8000,329.6396,204.6208,0,1);c++; // LS_StarTower_CopMaverick2
// Las Venturas - Airport - Baggage Puller/Trailers
	new Float:X,Float:Y,Float:Z;
	X=1490.0000;
	Y=1423.0000;
	Z=10.8500;
	Veh[c]=AddStaticVehicle(485,X,Y-6,Z,180,-1,-1);c++;
	new Float:NY;
	for(new i=0;i<19;i++)
	{
		NY=Y+3.7940*i;
		Veh[c]=AddStaticVehicle(606,X,NY,Z,180,-1,-1);c++;
	}
	Vehicles+=c;
	return 1;
}
public OnFilterScriptExit()
{
	for(new c=0;c<Vehicles;c++)
	{
		DestroyVehicle(Veh[c]);
	}
	return 1;
}
have a look at the startower in santos and at the LV airport - feel free to raise the 19 (trailers) in "for(new i=0;i<19;i++)" to 50
btw: this principle can be assigned to objects with ease.