• Any "talkable" NPC code released for people to use?
    3 replies, posted
Hey all. I'm working on a heavy edit of a gamemode called "Gmod Day-Z" Going really good. But I'm wanting MMO like NPC's where when a player talks to one, they can give out quests. Such as bounties on players, wanting particular in-game items and ect... Though getting my hands on just talkable NPC's will make things easier... and less expensive for when I hire someone for help. I've seen alot of these around. Such as in PERP RP where you can talk to NPC's to buy houses, sell drugs ect... And a few Dark RP servers too. Was just wondering if anyone here knows of something like that's open source? I've yet to find anything myself Thanks in advance.
Use [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/ENTITY/Use"]ENTITY/Use[/URL] in order to open the menu on the client. Open a DFrame [URL]http://wiki.garrysmod.com/page/Category:DFrame[/URL] and add DButtons to it. There isn't any framework that is 'open source' because they are pretty easy to make
Here's a base NPC I made that can probably help you : shared.lua : [code]ENT.Type = "ai" ENT.Base = "base_ai" ENT.PrintName = "NPC" ENT.Author = "charozoid" ENT.Contact = "" ENT.Purpose = "" ENT.Instructions = ""[/code] init.lua : [code]AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include('shared.lua') function ENT:Initialize() self:SetMoveType( MOVETYPE_STEP ) self:SetSolid( SOLID_BBOX ) self:SetUseType(SIMPLE_USE) self:SetHullType( HULL_HUMAN ) self:SetHullSizeNormal() self:SetSchedule( SCHED_IDLE_STAND ) self:DropToFloor() end function ENT:AcceptInput( name, activator, caller ) if name == "Use" && caller:IsPlayer() then net.Start("npc_use") net.WriteInt(self:GetID(), 10) net.Send(caller) end end function ENT:OnTakeDamage( dmg ) return false end[/code] cl_init.lua : [code] include('shared.lua') function ENT:Initialize () end function ENT:Draw() self:DrawModel() end[/code] Hope it's going to be useful for you.
I love you.
Sorry, you need to Log In to post a reply to this thread.