I just started a new gamemode and I’m going to have everyone notified on admin join, the only difference is it will be eye candy in the chat. I tried a simple listener server but It doesn’t tell me, I’m not sure if it just shit itself or what. Usually if something doesn’t work i get a lua error, yet I don’t get any errors whatsoever when i do this, I just don’t get the notification, did i do something wrong?
[lua]function TellAdmin( ply )
if ply:IsAdmin() then
for _, v in pairs( player.GetAll() ) do
chat.AddText( v, Color( 0,255,0 ), “[SandBox+]”,Color( 76,168,20 ),“Admin, “…ply:Nick()…”, has joined the game.” )
hook.Add( “PlayerInitialSpawn”, “TellAdmin”, TellAdmin )[/lua]