Ok
Did all that.
Some reason…I get no errors or anything and yet it doesn’t work. Nothing even appears.
init.lua
[lua]AddCSLuaFile(“cl_init.lua”)
AddCSLuaFile(“shared.lua”)
include(“shared.lua”)
function ENT:SpawnFunction( plr, tr )
if not tr.Hit then return end
local ent = ents.Create( self.Classname )
ent:SetPos( tr.HitPos + tr.HitNormal * 100 )
ent:Spawn()
ent:Activate()
return ent
end
function ENT:Initialize()
self:SetModel(“models/extras/info_speech.mdl”)
self:PhysicsInit( SOLID_NONE )
self:SetMoveType( MOVETYPE_NONE )
self:SetSolid( SOLID_NONE )
self.Yaw = 0
local phys = self:GetPhysicsObject()
if phys:IsValid() then phys:Wake() end
end
function ENT:SetPlayer( pl )
self:SetPos( pl:GetPos() + pl:GetUp() * 100 )
self:SetParent( pl )
end
function ENT:Think()
self:NextThink(CurTime())
self:SetAngles( self:GetAngles() + Angle(0,1,0) )
end[/lua]
which is in lua/entities/chatbox
and
[lua]if SERVER then
AddCSLuaFile(“autorun/chatclicker.lua”)
ErrorNoHalt(“Adding Server Chatclicker Hooks…”)
concommand.Add(“chatclicker.start”, function(ply, cmd, n)
if not ValidEntity(pl) || ValidEntity(ply.chatprop) then return end
ply.chatprop = ents.Create(“chatbox”)
ply.chatprop:SetPlayer(ply)
ply.chatprop:Spawn()
ply.chatprop:Activate()
end)
concommand.Add(“chatclicker.end”, function(ply, cmd, n)
if not ValidEntity(ply) then return end
if ValidEntity(ply.chatprop) then ply.chatprop:Remove() end
ErrorNoHalt("Done!
")
end)
end
if CLIENT then
ErrorNoHalt(“Adding Client Chatclicker Hooks…”)
hook.Add(“StartChat”, “chatclicker.start”, function() RunConsoleCommand(“chatclicker.start”) end)
hook.Add(“FinishChat”, “chatclicker.end”, function() RunConsoleCommand(“chatclicker.end”) end)
ErrorNoHalt("Done!
")
end[/lua]
which is in autorun
don’t mind the ErrorNoHalts. Just for testing purposes.