i have some problems whit a filterscript, the game crash when i go to login. (After 0.2 sec. lol)
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#include <a_samp>
#include <core>
#include <float>
#pragma tabsize 0
#define COLOUR_GREEN (0x00FF00AA)
#define COLOR_DIS_RED 0xFF0000FF
#define COLOR_BLUE 0x0000BBAA
new cancprincipale;//cancello principale
new gatemoto;//Cancello per le moto
new hangar;//hangar hydra
new
iColour = COLOUR_GREEN;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("NERD COMPANY 2013");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
//152651561
//cimitero base 1.0
CreateObject(16375, 387.60156, 2525.54688, 15.66406, 356.85840, 0.00000, 3.14159); //helipad
CreateObject(16375, 403.94775, 2525.47998, 15.64553, 0.00000, 0.00000, 0.00000); //helipad
CreateObject(16375, 419.07059, 2525.30371, 15.64553, 0.00000, 0.00000, 0.00000); //helipad
//Oggetti Base cimitero
CreateObject(4832,414.1000100,2553.8999000,46.9000000,0.0000000,0.0000000,269.2500000); //object(airtwer_las) (1)
CreateObject(16098,238.2000000,2544.1999500,20.8000000,0.0000000,0.0000000,270.0000000); //object(des_by_hangar_) (1)
CreateObject(8355,454.2000100,2491.6999500,18.2000000,0.0000000,90.0000000,174.0000000); //object(vgssairportland18) (1)
CreateObject(8355,387.1000100,2388.3999000,18.0000000,0.0000000,90.0000000,119.9940000); //object(vgssairportland18) (3)
CreateObject(8355,258.2000100,2353.8000500,18.0000000,0.0000000,90.0000000,89.9930000); //object(vgssairportland18) (4)
CreateObject(8355,121.0000000,2365.8000500,18.0000000,0.0000000,90.0000000,79.9890000); //object(vgssairportland18) (5)
CreateObject(8355,-6.9000000,2412.3999000,18.0000000,0.0000000,90.0000000,59.9860000); //object(vgssairportland18) (6)
CreateObject(8355,-51.5000000,2575.3999000,18.0000000,0.0000000,90.0000000,270.9830000); //object(vgssairportland18) (8)
CreateObject(8355,-51.5000000,2575.3999000,55.3000000,0.0000000,90.0000000,270.9830000); //object(vgssairportland18) (9)
CreateObject(8355,81.3000000,2603.6001000,18.0000000,0.0000000,90.0000000,292.9830000); //object(vgssairportland18) (10)
CreateObject(8355,81.3000000,2603.6001000,55.3000000,0.0000000,90.0000000,292.9780000); //object(vgssairportland18) (11)
CreateObject(8355,208.6000100,2657.6001000,18.0000000,0.0000000,90.0000000,292.9780000); //object(vgssairportland18) (13)
CreateObject(8355,208.6000100,2657.6001000,55.3000000,0.0000000,90.0000000,292.9780000); //object(vgssairportland18) (15)
CreateObject(8355,330.1000100,2646.6999500,18.0000000,0.0000000,90.0000000,236.7280000); //object(vgssairportland18) (14)
CreateObject(8355,330.1000100,2646.6999500,55.3000000,0.0000000,90.0000000,236.7280000); //object(vgssairportland18) (16)
CreateObject(8355,404.2999900,2598.6001000,6.1000000,90.0000000,90.0000000,236.7280000); //object(vgssairportland18) (20)
CreateObject(8355,438.3999900,2577.8999000,6.1000000,90.0000000,90.0000000,240.7280000); //object(vgssairportland18) (21)
CreateObject(8355,444.7999900,2574.1999500,6.1000000,90.0000000,90.0000000,240.7270000); //object(vgssairportland18) (24)
CreateObject(8355,455.2999900,2499.0000000,55.2000000,0.0000000,90.0000000,173.9960000); //object(vgssairportland18) (27)
CreateObject(8355,454.6000100,2495.8999000,18.2000000,0.0000000,90.0000000,173.9960000); //object(vgssairportland18) (29)
CreateObject(8240,336.0000000,2441.6999500,29.1000000,0.0000000,0.0000000,0.0000000); //object(vgssbighanger1) (1)
//Gate
hangar = CreateObject(8378,336.0000000,2474.8000500,25.4000000,0.0000000,0.0000000,0.0000000); //object(vgsbighngrdoor) (2)
gatemoto = CreateObject(16501,430.0000000,2546.3994100,17.4000000,0.0000000,0.0000000,0.0000000); //object(cn2_savgardr2_) (1)
cancprincipale = CreateObject(8355,-93.7000000,2510.6001000,18.0000000,0.0000000,90.0000000,22.9850000); //object(vgssairportland18) (7)
//Veicoli base
AddStaticVehicleEx(425,365.6000100,2538.8000500,17.5000000,0.0000000,95,10,15); //Hunter
AddStaticVehicleEx(563,380.8999900,2538.8000500,17.4000000,0.0000000,245,245,15); //Raindance
AddStaticVehicleEx(425,396.0000000,2540.0000000,17.4000000,0.0000000,95,10,15); //Hunter
AddStaticVehicleEx(520,309.1000100,2422.3000500,17.6000000,0.0000000,-1,-1,15); //Hydra
AddStaticVehicleEx(520,327.3999900,2421.0000000,17.6000000,0.0000000,-1,-1,15); //Hydra
AddStaticVehicleEx(520,345.2999900,2436.6001000,17.6000000,0.0000000,-1,-1,15); //Hydra
AddStaticVehicleEx(447,419.5000000,2444.6999500,16.6000000,24.0000000,32,32,15); //Seasparrow
AddStaticVehicleEx(447,390.1000100,2443.6999500,16.6000000,334.0000000,32,32,15); //Seasparrow
AddStaticVehicleEx(562,421.5000000,2469.8999000,16.3000000,290.0000000,53,54,15); //Elegy
AddStaticVehicleEx(562,385.8999900,2470.1999500,16.3000000,329.9950000,53,54,15); //Elegy
AddStaticVehicleEx(495,407.7000100,2445.3000500,17.1000000,0.0000000,134,68,15); //Sandking
AddStaticVehicleEx(495,402.1000100,2445.3000500,17.1000000,0.0000000,134,68,15); //Sandking
AddStaticVehicleEx(482,420.6000100,2463.6001000,16.8000000,288.0000000,124,27,15); //Burrito
AddStaticVehicleEx(411,387.2999900,2463.3000500,16.3000000,336.0000000,34,52,15); //Infernus
AddStaticVehicleEx(411,387.6000100,2455.6001000,16.3000000,335.9950000,34,52,15); //Infernus
AddStaticVehicleEx(451,398.6000100,2444.0000000,16.3000000,0.0000000,145,115,15); //Turismo
AddStaticVehicleEx(602,412.2000100,2445.0000000,16.4000000,0.0000000,32,32,15); //Alpha
AddStaticVehicleEx(522,440.7000100,2543.1999500,15.8000000,86.0000000,132,4,15); //NRG-500
AddStaticVehicleEx(522,440.6000100,2550.0000000,15.8000000,85.9950000,132,4,15); //NRG-500
AddStaticVehicleEx(463,437.7999900,2547.6001000,15.8000000,92.0000000,76,117,15); //Freeway
AddStaticVehicleEx(463,437.7000100,2545.5000000,15.8000000,92.0000000,76,117,15); //Freeway
AddStaticVehicleEx(468,434.6000100,2546.5000000,15.9000000,80.0000000,22,34,15); //Sanchez
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
//********************************************CANCELLO PRINCIPALE***************************************************
if (strcmp("/obase", cmdtext, true, 10) == 0)
{
MoveObject(cancprincipale,-93.7000000,2510.6001000,-5.8000001907349,0.97);//This will move the gate
SendClientMessage(playerid,iColour,"[NC:FR]Cancello aperto. Ricordati di chiudere!");
return 1;
}
if (strcmp("/cbase", cmdtext, true, 10) == 0)
{
MoveObject(cancprincipale,-93.69921875, 2510.599609375, 18,0.97);//This will move the gate
SendClientMessage(playerid,iColour,"[NC:FR]Cancello chiuso.");
return 1;
}
//........................................CANCELLO MOTO.............................................................
if (strcmp("/omoto", cmdtext, true, 10) == 0)
{
MoveObject(gatemoto,430.0000000,2546.3994100,12.40,0.97);//This will move the gate
SendClientMessage(playerid,iColour,"[NC:FR]Cancello aperto. Ricordati di chiudere!");
return 1;
}
if (strcmp("/cmoto", cmdtext, true, 10) == 0)
{
MoveObject(gatemoto,430.0000000,2546.3994100,17.4000000,1.0);//This will move the gate
SendClientMessage(playerid,iColour,"[NC:FR]Cancello chiuso.");
return 1;
}
/*---------------------------------------------------HYDRA------------------------------------------------*/
if (strcmp("/ohangar", cmdtext, true, 10) == 0)
{
MoveObject(hangar,336.0000000,2474.8000500,12.40,1.0);//This will move the gate
SendClientMessage(playerid,iColour,"[NC:FR]Cancello aperto. Ricordati di chiudere!");
return 1;
}
if (strcmp("/changar", cmdtext, true, 10) == 0)
{
MoveObject(hangar,336.0000000,2474.8000500,25.4000000,1.0);//This will move the gate
SendClientMessage(playerid,iColour,"[NC:FR]Cancello chiuso.");
return 1;
}
return 0;
}
/*********************************************FINE COMANDI**********************************************/
With a blank script yes but don't work for other players when the script is on.