3d2d code just not rendering in MP?

I made this cool and shiny 3d2d scoreboard thing, but when i ent_create it in multiplayer, it just spawns its prop but no 3d2d text or anything… Is there something i am obviously doing wrong?

Is your initialize hook being called for other users?
Try setting a boolean variable in the initialize hook and checking it in your draw function - if it isn’t registering, call your initialize hook.

There isn’t much more I can infer from what details you have given. How does it work in single player? Listen server? Client from a dedicated server?

Error messages?

Singleplayer it works perfectly, same with listen server. but when i put it on my local dedicated server it just dosent seem to work. Now what do you mean by the initialize hook? it is an entity, so you mean put a boolean variable in the initialize function, and if its not there when the cl_init runs, then run the initialize or something? because it acts like an eityty, with the outline and stuff…

Did you do AddCSLuaFile(“cl_init.lua”) and AddCSLuaFile(“shared.lua”) in your init.lua?

G.AddCSLuaFile

Yes i did.

[editline]11:13AM[/editline]

Alright… i just figured this out. I went back into singleplayer, and i spawned it, and low and behold it didnt work. So i renamed the entitiy file, and it worked. put that new renamed file in the dedi server, dosent work there, or when i get back into sp again… why could this be? if needed i can post the code.

Yes please.

Ok:

init.lua:
[lua]
AddCSLuaFile( “cl_init.lua” ) – Make sure clientside
AddCSLuaFile( “shared.lua” ) – and shared scripts are sent.
include(‘shared.lua’)
function ENT:Initialize()

self.Entity:SetModel( "models/hunter/plates/plate.mdl" )
self.Entity:PhysicsInit( SOLID_VPHYSICS )      -- Make us work with physics,
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )   -- after all, gmod is a physics
self.Entity:SetSolid( SOLID_VPHYSICS )         -- Toolbox

    local phys = self.Entity:GetPhysicsObject()
if (phys:IsValid()) then
	phys:Wake()
end

end

function ENT:Use( activator, caller )
end

function ENT:Think()
end
[/lua]
cl_init.lua
[lua]
include(‘shared.lua’)
include(‘init.lua’)
Add = 0
Menu = {“Name”,
“SteamID”,
“Ping”}
Offset = {0,
0,
80}
LocalPlayer():ConCommand(“gm_clearfonts”)
Opt = 1
function ENT:Draw()
self.Entity:DrawModel() – Draw the model.

local position1 = self.Entity:GetPos()+self.Entity:GetUp()3.7
local normal = self.Entity:GetAngles() //+Angle(self.Entity:GetAngles().p+math.sin(A)50,0,0) --(LocalPlayer():EyePos()-position):GetNormal()
local scale = 1
if(Auth == 0) then
cam.Start3D2D( position1, normal, scale )
draw.RoundedBox(1,-35,-3.5,70,15,Color(0,0,0,255))
draw.DrawText(“Scoreboard”, “DefaultFixed”, 0, 0, Color(100,200,255,255),1)
for i=1,#Menu do
draw.DrawText(Menu
,“DefaultFixed”, ((i
50)-100)+Offset*,20,Color(0,255,0,255))
end
for k, v in pairs(player.GetAll()) do
draw.DrawText(v:Nick(),“DefaultFixed”, ((150)-100)+Offset[1],(20k)+30,Color(0,0,0,255))
draw.DrawText(v:SteamID(),“DefaultFixed”, ((250)-100)+Offset[2],(20k)+30,Color(0,0,0,255))
draw.DrawText(v:Ping(),“DefaultFixed”, ((350)-100)+Offset[3],(20k)+30,Color(0,0,0,255))
Add = Add + 1
end

cam.End3D2D()

end
end
[/lua]
shared.lua
[lua]

ENT.Type = “anim”
ENT.Base = “base_gmodentity”

ENT.PrintName = “Namel”
ENT.Author = “Energy”
ENT.Contact = “Gtfo”
ENT.Purpose = “Its a scoreboard…”
ENT.Instructions = “Spawn it.”
[/lua]

Already something I see without testing, the cam.End is outside of the if check!

Make sure you have the model models/hunter/plates/plate.mdl in your server directory…

Also, why are you clearing the clients fonts? You could screw up other created fonts by other addons…

True, but if i don’t it displays the font SUPER HUGE

Why are you including init.lua in cl_init.lua?

[editline]06:08PM[/editline]

Well make a custom font… Instead of fucking up all of them.

I was including init.lua in the cl_init because i had a number being increased every think for a sin thing. and a custom font is what i mean, i make a cutsom font, and use it, and if i dont clear the fonts, it displays uber huge.

I see nothing for the sin thing in init.lua

And nowhere in your code are you making a custom font.

Don’t set ‘scale’ to 1, Set it to something from 0.1-0.01. Set your custom fonts size as needed. Including init.lua will not give you correct values from the server, As the server does not send them.

You’re not making a custom font.

Also you’ve made your init file both clientside and serverside at the same time without sending it clientside. Therefore, you’re including a clientside file that has not been sent to the client. Define anything you need to be shared in shared.lua.