SA-MP Forums Archive
Filterscript won't load objects - 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: Filterscript won't load objects (/showthread.php?tid=499588)



Filterscript won't load objects - Tagathron - 08.03.2014

As said in the title, i have a filterscript that doesn't load objects.

I am using the CreateDynamicObject, I have put the filterscript line in server.cfg, there are no compile errors/warnings.

The mappings are under OnFilterScriptInit()

Commands and other stuff work in the same filterscript, but it just won't load objects.


Re: Filterscript won't load objects - DanRellex - 08.03.2014

Are you adding the mapping under

Код:
OnFilterscriptInit()
?


Re: Filterscript won't load objects - XK - 08.03.2014

maybe they dont get saved or dont get loaded onfilterscripinit..?


Re: Filterscript won't load objects - Tagathron - 08.03.2014

Quote:
Originally Posted by DanRellex
Посмотреть сообщение
Are you adding the mapping under

Код:
OnFilterscriptInit()
?
Yep.


Re: Filterscript won't load objects - DanRellex - 08.03.2014

Quote:
Originally Posted by Tagathron
Посмотреть сообщение
Yep.
Then I suggest just adding it into your game-mode, Should work.


Re: Filterscript won't load objects - Tagathron - 08.03.2014

DanRellex, I know it will work in the gamemode, but I need it as a filterscript.That way i can add/change the mappings without having to GMX.


Re: Filterscript won't load objects - DanRellex - 08.03.2014

Код:
#include <a_samp>
#include <streamer>

public OnFilterScriptInit()
{
	CreateDynamicObject(1, 1, 1, 1, 1, 1, 1, 1);
	return 1;
}
Like that...?

Update streamer... Thats all I can think of.


Re: Filterscript won't load objects - Tagathron - 08.03.2014

Quote:
Originally Posted by DanRellex
Посмотреть сообщение
Код:
#include <a_samp>
#include <streamer>

public OnFilterScriptInit()
{
	CreateDynamicObject(1, 1, 1, 1, 1, 1, 1, 1);
	return 1;
}
Like that...?
Yes like that, except that my CreateDynamicObject(...) lines have proper coordinates and other arguments.


Re: Filterscript won't load objects - Corekt - 08.03.2014

Did you destroy all dynamic objects properly under OnFilterScriptExit()?

pawn Код:
public OnFilterScriptExit()
{
    // 0 indicates not serverwide, will only destroy objects within this script.
    Streamer_DestroyAllItems(STREAMER_TYPE_OBJECT, 0);
    return 1;
}



Re: Filterscript won't load objects - Tagathron - 08.03.2014

Quote:
Originally Posted by Corekt
Посмотреть сообщение
Did you destroy all dynamic objects properly under OnFilterScriptExit()?

pawn Код:
public OnFilterScriptExit()
{
    // 0 indicates not serverwide, will only destroy objects within this script.
    Streamer_DestroyAllItems(STREAMER_TYPE_OBJECT, 0);
    return 1;
}
Now when you have mentioned it, I have done that too.
Still nothing.