• Adv. Duplicator Autorun!
    3 replies, posted
Hey. Basically, I want the adv-duplicator to automatically spawn a saved base (not complicated, only some welds, ropes and elastics), when loading the correct map. How could I approach this?
You would use this hook, [url]http://wiki.garrysmod.com/?title=Gamemode.Initialize[/url] And this function, [url]http://wiki.garrysmod.com/?title=Game.GetMap[/url] Then you would use the adv duplicators function to open your file, and then send all the neccessary arguments to the adv duplicators spawn function.
[lua] local maps = { "gm_construct" } function AutorunDupe () if ( Game.GetMap() == maps ) then //whatever you do for duplicator end end hook.Add ( "Initialize", "AutorunDupe", AutorunDupe) [/lua] something like that
[b][url=wiki.garrysmod.com/?title=Gamemode.InitPostEntity]Gamemode.InitPostEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Sorry, you need to Log In to post a reply to this thread.