Hey, im trying to draw a box above all the spawn points on the map through client side
This is my code so far
for k,v in pairs(ents.FindByClass(“info_player_start”)) do
local pos = v:GetPos() + Vector(0,0,50)
local ang = v:GetAngles()
Msg(“Found Spawn Point”)
cam.Start3D(pos,ang)
draw.RoundedBox( 8, 50, 50, 100, 100, Color( 255, 255, 255 ) )
cam.End3D()
end
if it makes a difference im running it by going lua_openscript_cl test.lua
function DrawBox()
for k,v in pairs(ents.FindByClass(“info_player_start”)) do
local pos = v:GetPos() + Vector(0,0,50)
local ang = v:GetAngles()
Msg(“Found Spawn Point”)
cam.Start3D(pos,ang)
draw.RoundedBox( 8, 50, 50, 100, 100, Color( 255, 255, 255 ) )
cam.End3D()
end
end
hook.Add(“PostPlayerDraw”, “DrawBox”, DrawBox)
It seems that info_player_starts are not available clientside (try putting this into the console: lua_run_cl PrintTable(ents.FindByClass(“info_player_start”))).