Help please
#1

I tried to make something in MTA and convert to SAMP when I put in the filterscripts it doesn't appear in the game I even put FS name in server setting please check it out

http://pastebin.com/HXK2A5Q9

If you help me fix it I will give 1 rep
Reply
#2

If it's a filterscript, the problem is that you're creating the objects under OnGameModeInit; you need to use OnFilterScriptInit.
Reply
#3

So just this bit
public OnFilterScriptInit() to
public OnGameModeInit;

or?
Reply
#4

...No need
Reply
#5

You have to add the lines you have in OnFilterScriptInit under OnGameModeInit.
Reply
#6

Could you give me an example I am a bit of a n00b when it comes to scripting thanks
Reply
#7

Quote:
Originally Posted by john77
Посмотреть сообщение
Could you give me an example I am a bit of a n00b when it comes to scripting thanks
pawn Код:
public OnFilterScriptInit()
{
      // Code number 1
}

public OnGameModeInit()
{
      // Code number 2
}
To:

pawn Код:
public OnGameModeInit()
{
     // Code number 1
     // Code number 2
}
Reply
#8

So like this? http://pastebin.com/Zxuz0V1x
Reply
#9

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

#include <a_samp>

#if defined FILTERSCRIPT
new kk;
public OnFilterScriptInit()
{
       CreateObject(16121,-445.5000000,1442.9000200,20.0000000,0.0000000,0.0000000,132.0000000); //object(des_rockgp2_09) (1) (1)


       kk = CreateObject(16121,-445.5000000,1442.9000200,20.0000000,0.0000000,0.0000000,132.0000000); //object(des_rockgp2_09) (1) (1)
        // pos2         CreateObject(16121,-445.5000000,1442.9000200,20.0000000,0.0000000,0.0000000,132.0000000); //object(des_rockgp2_09) (1)
       return 1;

}

public OnFilterScriptExit()
{
        return 1;
}

#else

main()
{
        print("\n----------------------------------");
        print(" Blank Gamemode by your name here");
        print("----------------------------------\n");
}

#endif



public OnGameModeInit()
{
       
}

public OnGameModeExit()
{
        return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
        if (strcmp("/open", cmdtext, true, 10) == 0)
        {
        SendClientMessage(playerid,0x000000ff,"{ff0000}Welcome Back to your cave");
        MoveObject(kk, -395.20001220703, 1242.6999511719, -1.3999999761581, 208, 0.30000001);
        return 1;
        }
        if (strcmp("/close", cmdtext, true, 10) == 0)
        {
        SendClientMessage(playerid,0x000000ff,"{ff0000}You are now leaving the cave");
        MoveObject(kk, -395.20001220703, 1242.6999511719, 4.0999999046326, 208, 0.30000001);
        return 1;
        }
        return 0;
        }
try it
Reply
#10

pawn Код:
#include <a_samp>

main()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

new kk;

public OnFilterScriptInit()
{
    CreateObject(16121,-445.5000000,1442.9000200,20.0000000,0.0000000,0.0000000,132.0000000); //object(des_rockgp2_09) (1) (1)


    kk = CreateObject(16121,-445.5000000,1442.9000200,20.0000000,0.0000000,0.0000000,132.0000000); //object(des_rockgp2_09) (1) (1)
    // pos2     CreateObject(16121,-445.5000000,1442.9000200,20.0000000,0.0000000,0.0000000,132.0000000); //object(des_rockgp2_09) (1)
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/open", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0x000000ff,"{ff0000}Welcome Back to your cave");
        MoveObject(kk, -395.20001220703, 1242.6999511719, -1.3999999761581, 208, 0.30000001);
        return 1;
    }
    if (strcmp("/close", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0x000000ff,"{ff0000}You are now leaving the cave");
        MoveObject(kk, -395.20001220703, 1242.6999511719, 4.0999999046326, 208, 0.30000001);
        return 1;
    }
Ignore my previous messages - I thought you were trying to create a gamemode from your error messages. Use this code and it should be fine as a filterscript.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)