Saved Filterscripted Cars Not Showing/Coming -
ZombieNest - 24.12.2013
I made a FBI Cars FilterScript when i run it on server or load already from server CFG and it loads the car dosent appear
Please help..When I /rcon loadfs 1 time it does Loaded but dosent show cars when 2nd time i load fs it says "Load Failed" Help...
It can be compiled but not showing in Game:Code
Код:
#include <a_samp>
#include <a_vehicles>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
}
public OnPlayerSpawn()
{
SendClientMessage(playerid, 0xFF0000AA,F.B.I Cars Loading.....Loading.....
SendClientMessage(playerid, 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);
public OnFilterScriptExit()
{
return 1;
}
#else
#endif
Re: Saved Filterscripted Cars Not Showing/Coming -
Dignity - 24.12.2013
Код:
#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.
Re: Saved Filterscripted Cars Not Showing/Coming -
[DK]Dark_Knight - 24.12.2013
Can only be called when the script is initiating ex (OnGameModeInt())
Use
if you want to do it elsewhere