Author Topic: question with on join chat text box  (Read 2176 times)

0 Members and 1 Guest are viewing this topic.

Offline kaos2100

  • Newbie
  • *
  • Posts: 13
  • Karma: 2
question with on join chat text box
« on: October 19, 2012, 10:52:40 PM »
Will this work when a player joins it should replace the normal "Player has joined the server"

Code: [Select]
hook.Add("PlayerAuthed", "joinMsg", function(ply, sid)
    local nick = ply:Nick()
    local group = ply:GetUserGroup()
        if CLIENT then
                chat.AddText( Color( 255, 204, 51 ), "["..group.."] ", Color( 255, 255, 255 ), nick, Color( 255, 204, 51 ), " ("..sid..") ", Color( 255, 255, 255 ), "has joined the server!" )
        end
end)
« Last Edit: October 19, 2012, 11:13:02 PM by kaos2100 »