Posts: 62
Threads: 23
Joined: May 2013
Reputation:
0
I have a question?
Does anyone know how best to get rid of objects from GameMode, whether to include them as a switch or as FilterScript or something else? Thank you
Posts: 1,076
Threads: 70
Joined: Jul 2016
Reputation:
0
Put them on a separate file, and include them, that's how I do it
Posts: 599
Threads: 48
Joined: May 2016
create a new file called
objects.pwn and put it in includes folder
PHP код:
forward OnMapsInit();
public OnMapsInit()
{
/* Objects here */
}
go to top of you script and add
PHP код:
#include <objects.pwn>
and add in OnGameModeInit
PHP код:
public OnGameModeInit()
{
OnMapsInit();
}
Posts: 6,242
Threads: 8
Joined: Jun 2008
Obviously he hasn't read the question right as to remove objects for players, they need to be removed under OnPlayerConnect... Adding objects to the streamer would be under OnGamemodeInit.
Posts: 349
Threads: 38
Joined: Jul 2015
Reputation:
0
I would recommend to make a separate filterscript. Can be loaded/unloaded via the rcon command. Easier to make changes to the objects as well.
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by Sjn
I would recommend to make a separate filterscript. Can be loaded/unloaded via the rcon command. Easier to make changes to the objects as well.
|
There's a bug with filterscript reloading, it's better to have it in the gamemode especially if you want the gamemode to actually do things with the objects.
Posts: 6,242
Threads: 8
Joined: Jun 2008
Na, pretty sure I member it being to do with reloading filterscripts specifically.
Easier just to have it all combined properly.