• Need Lua Net help.
    0 replies, posted
-- is there a reason why the function for my gui does not load. useing net AddCSLuaFile() ENT.Base = "base_anim" ENT.Type = "anim" ENT.PrintName = "Vending Machine - Food" ENT.Category = "CombineControl" ENT.Author = "KnowHow" ENT.Contact = "" ENT.Purpose = "" ENT.Instructions = "" ENT.Spawnable = true; ENT.AdminSpawnable = true; ENT.AutomaticFrameAdvance = true; function ENT:PostEntityPaste( ply, ent, tab ) GAMEMODE:LogSecurity( ply:SteamID(), "n/a", ply:VisibleRPName(), "Tried to duplicate " .. ent:GetClass() .. "!" ); ent:Remove(); end function ENT:Initialize() self:SetModel( "models/props/slow/vending_machine_multi_sf/vending_machine.mdl" ); if( SERVER ) then util.AddNetworkString( "MyMessage" ) self:PhysicsInit( SOLID_VPHYSICS ); self:SetMoveType( MOVETYPE_VPHYSICS ); self:SetSolid( SOLID_VPHYSICS ); local phys = self:GetPhysicsObject(); if( phys and phys:IsValid() ) then phys:EnableMotion( false ); end self:SetUseType( SIMPLE_USE ); end end function ENT:Use( ply ) if( SERVER ) then net.Start( "MyMessage" ) net.Send( ply ) end if( CLIENT ) then net.Receive( "MyMessage", dim() ) function dim( len ) print( "I was clicked!" ) end end end function ENT:CanPhysgun() return true; end
Sorry, you need to Log In to post a reply to this thread.