Ulysses

General => Developers Corner => Topic started by: kaos2100 on October 19, 2012, 10:52:40 PM

Title: question with on join chat text box
Post by: kaos2100 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)