Saved Filterscripted Cars Not Showing/Coming
#2

Код:
#include <a_samp>
#include <a_vehicles>

#define FILTERSCRIPT

public OnFilterScriptInit()
{

	SendClientMessageToAll(0xFF0000AA, "F.B.I Cars Loading.....Loading.....");
	SendClientMessageToAll(0xFF0000AA, "F.B.I Cars Loaded..");

	AddStaticVehicle(402,622.3071,-609.7212,16.9900,2.4623,0,0);
	AddStaticVehicle(402,627.3495,-609.4268,16.4553,357.4713,0,0);
	AddStaticVehicle(402,631.4123,-609.5760,16.1676,1.3216,0,0);
	AddStaticVehicle(490,612.3222,-590.8718,17.3589,270.1323,0,0);
	AddStaticVehicle(490,626.9714,-586.8743,16.7971,181.1560,0,0);
	AddStaticVehicle(490,619.6288,-586.7992,17.3573,224.5453,0,0);
	AddStaticVehicle(528,615.1095,-608.5289,17.2707,357.7486,0,0);
	AddStaticVehicle(528,610.2350,-607.4523,17.2697,0.3380,0,0);

	return 1;
}


public OnFilterScriptExit()
{
// Deletes cars on exit
    for(new i=1;i<MAX_VEHICLES;i++)
		DestroyVehicle(i);

	return 1;
}
You can not use SendClientMessage(playerid) under OnFilterScriptInit because it has no (playerid) function. Use print("message"); incase you want to send it to the console; not players.

You should also have put the cars OnFilterScriptInit; so when the script starts; it will spawn the cars.

The OnFilterScriptExit code makes sure all cars are also removed when you reload the filterscript.

At the top of your script, you should have changed "#if defined filterscript" to "#define filterscript" and you should have removed the #else and #endif.

I compiled this smoothily, so it should work.
Reply


Messages In This Thread
Saved Filterscripted Cars Not Showing/Coming - by ZombieNest - 24.12.2013, 06:17
Re: Saved Filterscripted Cars Not Showing/Coming - by Dignity - 24.12.2013, 06:30
Re: Saved Filterscripted Cars Not Showing/Coming - by [DK]Dark_Knight - 24.12.2013, 08:41

Forum Jump:


Users browsing this thread: 1 Guest(s)