Restarting individual GM modules?
#1

Hellow guys, i'm here for asking if it's there a way to restart just some parts of the GM using FS or something, i mean i want to be able to update the server without restarting it.
Reply
#2

Update what exactly?
Reply
#3

Updating a command from the server for ex.
Reply
#4

Yes, you can use filterscripts. But take great care that you also clean up everything on unload otherwise you're going to run into some serious trouble. A gamemode has the advantage that an implicit cleanup takes place on exit but a filterscript has no such advantage. Entities that you create within the filterscript must be explicitly destroyed on exit or else they will persist and duplicates will be generated when the script gets loaded again.
Reply
#5

So using gvar will help me up?
Reply
#6

So for example, you want to update /cmds without having to restart the server?
Reply
#7

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
So for example, you want to update /cmds without having to restart the server?
Yes.
Reply
#8

Quote:
Originally Posted by nGen.SoNNy
Посмотреть сообщение
Yes.
Use filterscripts then, but why do you want to do that anyway?
Reply
#9

Unless you know your code too well and as Vince said cleanup when unloading FS, I strongly recommend you not to do that, a single thing you forget to remove OnFSExit and your dreams will turn into nightmares!
But yeah, it is technically possible to be done by using Filterscripts.
Reply
#10

Everything needed was already said by Vince and the others, but I'll explain what Vince meant because I don't think you understood very much (No offense of course)

Let's say you created objects or pickups or w/e, you should destroy them under
Код:
public OnFilterScriptExit
or else duplicated will be created once the filterscript is reloaded.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)