I have a script that's not running on startup, despite being placed in lua\autorun\server.
Basically, it has a bunch of Entity(#):Remove() calls, and if I remove those then it will run on startup fine. Is this something to do with the map not being loaded? And, if so, how can I cause it to actually run properly? Thanks!
Sorry for bumping, but...no answers?
Are you removing the entities in a InitPostEntity hook?
[editline]09:19PM[/editline]
[b][url=wiki.garrysmod.com/?title=Gamemode.InitPostEntity]Gamemode.InitPostEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
This hook is called after all the entities have been created, so you need to do your removing this.
[QUOTE=MakeR;22150342]Are you removing the entities in a InitPostEntity hook?
[editline]09:19PM[/editline]
[b][url=wiki.garrysmod.com/?title=Gamemode.InitPostEntity]Gamemode.InitPostEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
This hook is called after all the entities have been created, so you need to do your removing this.[/QUOTE]
Thanks!
Sorry, you need to Log In to post a reply to this thread.