SA-MP Forums Archive
How to make a Filterscript ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make a Filterscript ? (/showthread.php?tid=67420)



How to make a Filterscript ? - Throne - 01.03.2009

Like the title said. How can you make a Filterscript ?


Re: How to make a Filterscript ? - Vince - 01.03.2009

pawn Code:
#define FILTERSCRIPT
Or remove the whole #if statement.


Re: How to make a Filterscript ? - GunnerZ - 01.03.2009

Well you code it exactly the same as the main script BUT you then add it to the .cfg so that it is included on your server.

Here is the standard empty Filterscript source.

pawn Code:
#include <a_samp>

#define FILTERSCRIPT

#if defined FILTERSCRIPT

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



Re: How to make a Filterscript ? - kuberaland - 23.04.2011

How do I put this as a filterscript:

Quote:

AddStaticVehicleEx(446,-937.04980469,2651.60742188,42.20914459,135.9997558 6,-1,-1,15); //Squalo
AddStaticVehicleEx(560,-897.45996094,2685.41796875,42.17216110,43.99475098 ,-1,-1,15); //Sultan
AddStaticVehicleEx(560,-899.51660156,2683.35351562,42.17523575,45.99975586 ,-1,-1,15); //Sultan
AddStaticVehicleEx(468,-902.74938965,2690.75415039,42.12718582,155.9998779 3,-1,-1,15); //Sanchez
AddStaticVehicleEx(468,-901.71063232,2689.78906250,42.13026047,159.9998779 3,-1,-1,15); //Sanchez
CreateObject(2921,-907.74511719,2689.08447266,44.32780457,0.00000000, 0.00000000,309.25000000); //object(kmb_cam) (1)
CreateObject(2922,-909.75433350,2686.62695312,42.45322037,0.00000000, 0.00000000,42.75000000); //object(kmb_keypad) (1)
CreateObject(2921,-916.16485596,2668.90966797,44.54096603,0.00000000, 0.00000000,96.50000000); //object(kmb_cam) (2)
CreateObject(2922,-899.75476074,2696.66455078,42.53889084,0.00000000, 0.00000000,42.75000000); //object(kmb_keypad) (2)




Re: How to make a Filterscript ? - Miguel_Teixeira - 23.04.2011

onfilterscriptinit


Re: How to make a Filterscript ? - Stigg - 23.04.2011

pawn Code:
public OnFilterScriptInit()
{
    AddStaticVehicleEx(446,-937.04980469,2651.60742188,42.20914459,135.9997558 6,-1,-1,15); //Squalo
    AddStaticVehicleEx(560,-897.45996094,2685.41796875,42.17216110,43.99475098 ,-1,-1,15); //Sultan
    AddStaticVehicleEx(560,-899.51660156,2683.35351562,42.17523575,45.99975586 ,-1,-1,15); //Sultan
    AddStaticVehicleEx(468,-902.74938965,2690.75415039,42.12718582,155.9998779 3,-1,-1,15); //Sanchez
    AddStaticVehicleEx(468,-901.71063232,2689.78906250,42.13026047,159.9998779 3,-1,-1,15); //Sanchez
    CreateObject(2921,-907.74511719,2689.08447266,44.32780457,0.00000000, 0.00000000,309.25000000); //object(kmb_cam) (1)
    CreateObject(2922,-909.75433350,2686.62695312,42.45322037,0.00000000, 0.00000000,42.75000000); //object(kmb_keypad) (1)
    CreateObject(2921,-916.16485596,2668.90966797,44.54096603,0.00000000, 0.00000000,96.50000000); //object(kmb_cam) (2)
    CreateObject(2922,-899.75476074,2696.66455078,42.53889084,0.00000000, 0.00000000,42.75000000); //object(kmb_keypad) (2)
    return 1;
}



Re: How to make a Filterscript ? - jtweak - 20.11.2011

honestly, i think someone should create a whole new scripting tutorial, thats EASIER TO UNDERSTAND, oops, wrong topic....sorry.