• NPC Use?
    2 replies, posted
So I've made a SNPC, and I want people to be able to press use on it. I have this in init.lua, because it's for the server, but it doesn't work [lua] function ENT:Use( activator, caller ) print("sup"); if ( activator:IsPlayer() ) then print("is player!") end end [/lua]
[code]SNPC:SetUseType( SIMPLE_USE )[/code] [url=http://wiki.garrysmod.com/?title=NPC_Shop_Tutorial]NPC Shop Tutorial[/url]
Ah! That's the tutorial I was looking for, but found [url=http://wiki.garrysmod.com/?title=Basic_Scripted_NPC]this one[/url]
Sorry, you need to Log In to post a reply to this thread.