Changing a script from an empty GM into FS?
#1

So, I really don't remember how/if you could translate a script from gamemode into a FS...

I have two scripts in a empty gamemode, which I want to change in FS's.... But, how did I do it? Could someone do it, or was it even possible? >.>


http://pastebin.com/Tyr1kAxp
Reply
#2

http://pastebin.com/giKC79Vb
Here you go!
Reply
#3

Oh, that fast... Thanks xD
Reply
#4

Just to help you when you want to convert other GM into a filterscript

After #include <a.samp>

place

#define FILTERSCRIPT

So, it will define as a filterscript

like

#include <a.samp>

#define FILTERSCRIPT

So, under #define FILTERSCRIPT, you have to initiate the script, so

public OnFilterScriptInit( )

{
SetGameModeText("Blank Script");
AddPlayerClass(0, 0, 0, 0, 0.0, 0, 0, 0, 0, 0, 0); ( You can change the 0, 0, 0's, sinc they work to the player classes )
return 1;
}
Reply
#5

WRONGGGG!!!!!
You gotta do
pawn Код:
#include <a_samp>
Then under that define
pawn Код:
#define FILTERSCRIPT
then change these
pawn Код:
public OnGameModeInit( )
to
public OnFilterScriptInit( )
And
pawn Код:
public OnGameModeExit( )
To
public OnFilterScriptExit( )
and done xD.
Reply
#6

Sorry,forgot to get the pawn code BB!
Reply
#7

Amateurs.

#define FILTERSCRIPT is useful ONLY if used aswell with "#if defined FILTERSCRIPT" as seen in the blank script.

pawn Код:
#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
To translate a gamemode into FS I think only think you need to do is rename "OnGameModeInit" to "OnFilterScriptInit", "OnGameModeExit" to "OnFilterScriptExit", and move all from "main()" to OnFilterScriptInit, and then remove main() function.

Please, do not post if you have no idea what you are talking about.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)