Map Filterscript?
#1

Just wondering if someone could help me with this, i want to make a filter script, that just contains stuff that i mapped, so basically just a filter script, witch has the ' objects ' in it, and if i put it as a filter script in my server, the objects will load up? Hope you understand what im saying.

Cheers.
Reply
#2

Just make a filterscript and put all the objects on OnFilterScriptInit .
Reply
#3

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Just make a filterscript and put all the objects on OnFilterScriptInit .
Ehh so like this?

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT
#endif

public OnFilterScriptInit()
{
CreateObject(2896, 2100.4233398438, 1274.2763671875, 10.809901237488, 0, 0, 266);
CreateObject(2896, 2090.2897949219, 1274.2396240234, 10.809901237488, 0, 0, 269.99548339844);
CreateObject(1225, 2100.923828125, 1279.5895996094, 15.70263004303, 0, 0, 0);
CreateObject(1225, 2091.7805175781, 1279.6281738281, 15.70263004303, 0, 0, 0);
CreateObject(1225, 2096.0661621094, 1279.6110839844, 15.70263004303, 0, 0, 0);
CreateObject(1225, 2096.568359375, 1291.2701416016, 15.70263004303, 0, 0, 0);
CreateObject(1225, 2100.8557128906, 1291.2264404297, 15.70263004303, 0, 0, 0);
CreateObject(1225, 2091.2292480469, 1291.2497558594, 15.70263004303, 0, 0, 0);
CreateObject(2780, 2096.2763671875, 1281.9228515625, 24.513202667236, 0, 0, 0);
CreateObject(3461, 2092.8188476563, 1277.1627197266, 11.387852668762, 0, 0, 0);
CreateObject(3461, 2092.818359375, 1277.162109375, 11.387852668762, 0, 0, 0);
CreateObject(3461, 2099.5844726563, 1276.1407470703, 11.395323753357, 0, 0, 0);
CreateObject(3461, 2092.8283691406, 1293.9196777344, 11.395323753357, 0, 0, 0);
CreateObject(3461, 2099.6123046875, 1293.4189453125, 11.395323753357, 0, 0, 0);
CreateObject(1634, 2067.8515625, 797.86328125, 11.117630004883, 0, 0, 180);
}

public OnFilterScriptExit()
{
?

Sorry i'm new to scripting
Reply
#4

Yes, but indent it.

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Maps");
    print("--------------------------------------\n");
    return 1;
   
    //tower
     CreateObject(2896, 2100.4233398438, 1274.2763671875, 10.809901237488, 0, 0, 266);
     CreateObject(2896, 2090.2897949219, 1274.2396240234, 10.809901237488, 0, 0, 269.99548339844);
     CreateObject(1225, 2100.923828125, 1279.5895996094, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2091.7805175781, 1279.6281738281, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2096.0661621094, 1279.6110839844, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2096.568359375, 1291.2701416016, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2100.8557128906, 1291.2264404297, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2091.2292480469, 1291.2497558594, 15.70263004303, 0, 0, 0);
     CreateObject(2780, 2096.2763671875, 1281.9228515625, 24.513202667236, 0, 0, 0);
     CreateObject(3461, 2092.8188476563, 1277.1627197266, 11.387852668762, 0, 0, 0);
     CreateObject(3461, 2092.818359375, 1277.162109375, 11.387852668762, 0, 0, 0);
     CreateObject(3461, 2099.5844726563, 1276.1407470703, 11.395323753357, 0, 0, 0);
     CreateObject(3461, 2092.8283691406, 1293.9196777344, 11.395323753357, 0, 0, 0);
     CreateObject(3461, 2099.6123046875, 1293.4189453125, 11.395323753357, 0, 0, 0);
     CreateObject(1634, 2067.8515625, 797.86328125, 11.117630004883, 0, 0, 180);
}
public OnFilterScriptExit()
{
    return 1;
}
Reply
#5

Quote:
Originally Posted by funky1234
Посмотреть сообщение
Yes, but indent it.

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Maps");
    print("--------------------------------------\n");
    return 1;
   
    //tower
     CreateObject(2896, 2100.4233398438, 1274.2763671875, 10.809901237488, 0, 0, 266);
     CreateObject(2896, 2090.2897949219, 1274.2396240234, 10.809901237488, 0, 0, 269.99548339844);
     CreateObject(1225, 2100.923828125, 1279.5895996094, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2091.7805175781, 1279.6281738281, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2096.0661621094, 1279.6110839844, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2096.568359375, 1291.2701416016, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2100.8557128906, 1291.2264404297, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2091.2292480469, 1291.2497558594, 15.70263004303, 0, 0, 0);
     CreateObject(2780, 2096.2763671875, 1281.9228515625, 24.513202667236, 0, 0, 0);
     CreateObject(3461, 2092.8188476563, 1277.1627197266, 11.387852668762, 0, 0, 0);
     CreateObject(3461, 2092.818359375, 1277.162109375, 11.387852668762, 0, 0, 0);
     CreateObject(3461, 2099.5844726563, 1276.1407470703, 11.395323753357, 0, 0, 0);
     CreateObject(3461, 2092.8283691406, 1293.9196777344, 11.395323753357, 0, 0, 0);
     CreateObject(3461, 2099.6123046875, 1293.4189453125, 11.395323753357, 0, 0, 0);
     CreateObject(1634, 2067.8515625, 797.86328125, 11.117630004883, 0, 0, 180);
}
public OnFilterScriptExit()
{
    return 1;
}
Alright i did an indent into it"

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Maps");
    print("--------------------------------------\n");
    return 1;
}
    //tower
     CreateObject(2896, 2100.4233398438, 1274.2763671875, 10.809901237488, 0, 0, 266);
     CreateObject(2896, 2090.2897949219, 1274.2396240234, 10.809901237488, 0, 0, 269.99548339844);
     CreateObject(1225, 2100.923828125, 1279.5895996094, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2091.7805175781, 1279.6281738281, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2096.0661621094, 1279.6110839844, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2096.568359375, 1291.2701416016, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2100.8557128906, 1291.2264404297, 15.70263004303, 0, 0, 0);
     CreateObject(1225, 2091.2292480469, 1291.2497558594, 15.70263004303, 0, 0, 0);
     CreateObject(2780, 2096.2763671875, 1281.9228515625, 24.513202667236, 0, 0, 0);
     CreateObject(3461, 2092.8188476563, 1277.1627197266, 11.387852668762, 0, 0, 0);
     CreateObject(3461, 2092.818359375, 1277.162109375, 11.387852668762, 0, 0, 0);
     CreateObject(3461, 2099.5844726563, 1276.1407470703, 11.395323753357, 0, 0, 0);
     CreateObject(3461, 2092.8283691406, 1293.9196777344, 11.395323753357, 0, 0, 0);
     CreateObject(3461, 2099.6123046875, 1293.4189453125, 11.395323753357, 0, 0, 0);
     CreateObject(1634, 2067.8515625, 797.86328125, 11.117630004883, 0, 0, 180);
}
public OnFilterScriptExit()
{
    return 1;
}
Now when i try to complie:

Код:
C:\Users\azd\Desktop\samp03bsvr_R2_win32\filterscripts\maps.pwn(15) : error 021: symbol already defined: "CreateObject"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Any ideas? Also when i try to run it now with my GM in the console box says " unable to load 'maps.amx' "
Reply
#6

My Bad xD - i did only just wake up

Here:

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Maps");
    print("--------------------------------------\n");
   
    //tower
    CreateObject(2896, 2100.4233398438, 1274.2763671875, 10.809901237488, 0, 0, 266);
    CreateObject(2896, 2090.2897949219, 1274.2396240234, 10.809901237488, 0, 0, 269.99548339844);
    CreateObject(1225, 2100.923828125, 1279.5895996094, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2091.7805175781, 1279.6281738281, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2096.0661621094, 1279.6110839844, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2096.568359375, 1291.2701416016, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2100.8557128906, 1291.2264404297, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2091.2292480469, 1291.2497558594, 15.70263004303, 0, 0, 0);
    CreateObject(2780, 2096.2763671875, 1281.9228515625, 24.513202667236, 0, 0, 0);
    CreateObject(3461, 2092.8188476563, 1277.1627197266, 11.387852668762, 0, 0, 0);
    CreateObject(3461, 2092.818359375, 1277.162109375, 11.387852668762, 0, 0, 0);
    CreateObject(3461, 2099.5844726563, 1276.1407470703, 11.395323753357, 0, 0, 0);
    CreateObject(3461, 2092.8283691406, 1293.9196777344, 11.395323753357, 0, 0, 0);
    CreateObject(3461, 2099.6123046875, 1293.4189453125, 11.395323753357, 0, 0, 0);
    CreateObject(1634, 2067.8515625, 797.86328125, 11.117630004883, 0, 0, 180);
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
That should work
Reply
#7

Quote:
Originally Posted by funky1234
Посмотреть сообщение
My Bad xD - i did only just wake up

Here:

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Maps");
    print("--------------------------------------\n");
   
    //tower
    CreateObject(2896, 2100.4233398438, 1274.2763671875, 10.809901237488, 0, 0, 266);
    CreateObject(2896, 2090.2897949219, 1274.2396240234, 10.809901237488, 0, 0, 269.99548339844);
    CreateObject(1225, 2100.923828125, 1279.5895996094, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2091.7805175781, 1279.6281738281, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2096.0661621094, 1279.6110839844, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2096.568359375, 1291.2701416016, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2100.8557128906, 1291.2264404297, 15.70263004303, 0, 0, 0);
    CreateObject(1225, 2091.2292480469, 1291.2497558594, 15.70263004303, 0, 0, 0);
    CreateObject(2780, 2096.2763671875, 1281.9228515625, 24.513202667236, 0, 0, 0);
    CreateObject(3461, 2092.8188476563, 1277.1627197266, 11.387852668762, 0, 0, 0);
    CreateObject(3461, 2092.818359375, 1277.162109375, 11.387852668762, 0, 0, 0);
    CreateObject(3461, 2099.5844726563, 1276.1407470703, 11.395323753357, 0, 0, 0);
    CreateObject(3461, 2092.8283691406, 1293.9196777344, 11.395323753357, 0, 0, 0);
    CreateObject(3461, 2099.6123046875, 1293.4189453125, 11.395323753357, 0, 0, 0);
    CreateObject(1634, 2067.8515625, 797.86328125, 11.117630004883, 0, 0, 180);
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
That should work
Thank you so much, I love you ahha (:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)