Player Spawn help!
I am trying to make a MOTD so when a player spawns it will show up. I am not getting any errors but it will not show when I spawn. Would anyone be able to help? This is what I got so far. I am not sure if it is correct.
local function Spawn( ply )
function PANEL:init()
self:SetSize( 100, 100 )
self:Center(0)
end
vgui.Register( "MyFirstPanel", PANEL, "Panel" )
end
Your first problem is that your not actually calling that Spawn() function to anything. You're creating it just fine, however your not calling it.
To call it, I would say you need to use the InitPostEntity hook.
Secondly, your creating a panel not a frame, and are making a new one instead of using it to display one. If your unfamiliar with VGUI stuff, I would advice watching Code Blue's tutorials.
Thank you Livaco!