NPC stance is weird

Hey, my NPC’s stance is really weird. When I go to my gamemode, this is what my NPC looks like:

Anyone know how to fix this so she looks like a normal person? If you need my codes for my NPC, just tell me.

Bump. Posted almost one day ago.

I think I know, can I see the code? The enumerations may be wrong (Though that may only be for SWEPS…)

I got this code from someone:

Anyone know where this goes? I looked it up, and it goes in shared, but I don’t know where.

Hmm…I’ve never gotten an NPC to work, but I would guess in it’s own hook? Test it and see, there’s a good chance I’m wrong.

It’s not a hook. I checked on GMod Wiki.

A function, then? It may just be a command that runs on its own, and isn’t a parameter of another command. Just place it somewhere in your code, and end it with an “end”, and see if that works. I’m very unfamiliar with my lua vocabulary, I’m attempting to learn, though!

Is this a custom SNPC or an npc_citizen?

Either way, take a look at this page: **[Entity.SetSequence](**

That’s where I first looked. I don’t understand where to put it, though. And it is a custom SNPC.

Put that anywhere in the code, and end it with an “end” is what I’m guessing…

You can fix it using one of these cvars:
ai_disable / ai_disabled (I don’t recall which one it is off-hand.)

Can you give the entire code of your scripted NPC?


[lua]AddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )

function ENT:SpawnFunction( ply, tr )

if ( !tr.Hit ) then return end

local SpawnPos = (tr.HitPos + tr.HitNormal * 16) 

local ent = ents.Create( "ai_jpcai_clothing" )
ent:SetPos( SpawnPos )

return ent




function ENT:Draw()

function ENT:DrawTranslucent()

function ENT:SetRagdollBones( bIn )
self.m_bRagdollSetup = bIn

function Menu()
local menu = vgui.Create( “DFrame” )
menu:SetSize( 400, 500 )
menu:SetTitle( “Testing NPC” )
menu:SetDraggable( false )
menu:ShowCloseButton( true )

local close = vgui.Create( "DButton", menu )

close:SetSize( 400, 20 )
close:SetText( “Close” )
close:SetPos( 0, 20 )
close.DoClick = function()

ENT.Base = “base_ai”
ENT.Type = “ai”

ENT.PrintName = “Test NPC”
ENT.Author = “wakeboarderCWB”
ENT.Contact = “N/A” //fill in these if you want it to be in the spawn menu
ENT.Purpose = “N/A”
ENT.Instructions = “N/A”

ENT.AutomaticFrameAdvance = true

function ENT:AcceptInput(input, entActivator, entCaller, data)
if string.lower(input) == “use” then

function ENT:AcceptInput( input, activator, caller )
if not timerforbox then
timerforbox = true timer.Simple(1, function() timerforbox = false end)
if input == “Use” && activator:IsPlayer() then
caller:SendLua( “Menu()” )

Here’s the code to a working SNPC I posted a while ago :

Take that and adapt it to your needs (use the skeleton init.lua, the other one is an example).

(I know its an old thread, but…)

Where do you put those files Crazy? I have a copy-paste gamemode I’m making, using copypaste code to see if I can get it WORKING. Then I have a little test gamemmode that I’m doing from scratch from what I’ve learned.

I have in my gamemode file cl_init.lua, init.lua, and shared.lua

For the Npc, would I make a new folder in the gamemode folder? I thought it would just be a “weapon_npc.lua” or something. Or woudl I edit my gamemodes cl_init.lua, init.lua, and shared.lua?

Right now I just want my npc to appear in my Copypaste gamemode, and USE to do anything. If it just opens a menu, or says “Hi” in console… Or anything. I just want my USE input to do something.