Is there a way to spawn an npc with a vgui button?
There are console commands to spawn NPC's, so it would probably be possible.
Can you tell me what the console command is please?
[QUOTE=gardian90;21611946]Can you tell me what the console command is please?[/QUOTE]
Esc -> options -> keyboard -> Advanced -> Enable Developer Console (`)!
And hit Ok, then press ` to open console.
"Console command"
Thanks anyways. I found it though. If anyone wants to know what it is, its
"gmod_spawnnpc npc_name"
[lua] Button1.DoClick = function()
RunConsoleCommand("gmod_spawnnpc spawnnamehere"
end
[/lua]
[EDITLINE]RAWR[/EDITLINE]
Ninja'd
[QUOTE=Dave_Parker;21613193]Now figure out the 2 flaws in your code. Ready? GO![/QUOTE]
1. forgot the ")"
2. ... haven't seen it yet will keep looking it over
Oh yes I forgot args, I'm not very good with them so I tend to forget.
Sorry, you need to Log In to post a reply to this thread.