• Problem for include model in my addon
    1 replies, posted
Hi all, I have one problem for include my model in my addon. It's a NPC with this model : [url]http://www.garrysmod.org/downloads/?a=view&id=54804[/url] I used the first one : scrub1a.mdl my addon : lua --> autorun ----> server ------> init.lua ------> resources.lua --> entities ----> d_npc ------> cl_init.lua ------> init.lua ------> shared.lua models FILE OF TOP ADDONS init.lua : [CODE] include("resources.lua"); MsgN("Trolol"); [/CODE] resources.lua : [CODE] resource.AddFile("models/Humans/Group01/scrub1a.mdl"); MsgN("Resources loaded !"); [/CODE] d_npc/init.lua : [CODE] AddCSLuaFile("cl_init.lua"); AddCSLuaFile("shared.lua"); include('shared.lua'); function ENT:Initialize() self:SetModel("models/Humans/Group01/scrub1a.mdl"); self:SetHullType(HULL_HUMAN); self:SetHullSizeNormal( ); self:SetNPCState(NPC_STATE_SCRIPT); self:SetSolid(SOLID_BBOX); self:CapabilitiesAdd(CAP_ANIMATEDFACE); self:SetUseType(SIMPLE_USE); self:DropToFloor(); self:SetMaxYawSpeed(180); end [/CODE] d_npc/shared.lua : [CODE] ENT.Base = "base_ai"; ENT.Type = "ai"; ENT.AutomaticFrameAdvance = true; ENT.PrintName = "b_NPC"; ENT.Author = "Boost"; ENT.Category = "b_NPC"; ENT.Instructions = "" ; ENT.Spawnable = true; ENT.AdminSpawnable = true; [/CODE] In my game nothing is download when i'm connecting to my server. When I spawn the NPC his skin is ERROR. Someone can help me ?
Do you have FastDL enabled? If so, the model needs to be on both the game-server and the FastDL server. If you use Server-DL make sure the file is in the correct spot, and sv_allowupload is 1.
Sorry, you need to Log In to post a reply to this thread.