• Why arent NPC's working
    5 replies, posted
I know I have already created a thread for this but now I have a completely different problem and the other thread is gone. I made a addon and a entity (garrysmod/addons/NPCPickupJob/lua/entites/npc_supplydealer/init, cl_init, shared.lua) and pasted the exact code from a basic scripted npc example ([url]https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexde03.html[/url]). If I open the spawnmenu and go to NPCs or even Entites my npc isnt there. I tried so many different things over the past day and I cant even get it to spawn in the menu. I am litterly just wanting a npc that you can spawn and place somewhere and it just stands there. If someone can please help me that would be great.
[QUOTE=ZeroToHero;52593674]I know I have already created a thread for this but now I have a completely different problem and the other thread is gone. I made a addon and a entity (garrysmod/addons/NPCPickupJob/lua/entites/npc_supplydealer/init, cl_init, shared.lua) and pasted the exact code from a basic scripted npc example ([url]https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexde03.html[/url]). If I open the spawnmenu and go to NPCs or even Entites my npc isnt there. I tried so many different things over the past day and I cant even get it to spawn in the menu. I am litterly just wanting a npc that you can spawn and place somewhere and it just stands there. If someone can please help me that would be great.[/QUOTE] use console commands to spawn it npc_create <internal npc name> I think it is
I got a error [CODE] ] npc_create npc_supplydealer Attempted to create unknown entity type npc_supplydealer! [/CODE]
Its a scripted entity, you need to use ent_create in that case, or ents.Create if you doing it in Lua
Tried both and its still not working.
Put the folder "npc_supplydealer" and it's contents inside of .../common/GarrysMod/garrysmod/lua/entities/
Sorry, you need to Log In to post a reply to this thread.