Jump to content

Chats


1LoL1

Recommended Posts

Post the script for that chat.

ok

-- Client

bindKey("x", "down", "chatbox", "global") 

-- Server

function globalMessage(thePlayer, cmd, ...) 
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName(thePlayer) 
    outputChatBox("#009BFFGlobalChat: #FFFFFF"..name..": #99FF00"..message, getRootElement(), 255, 255, 255, true) 
    end 
addCommandHandler("global", globalMessage) 
  

Link to comment
function globalMessage ( thePlayer, cmd, ... ) 
    if isPlayerMuted ( thePlayer ) then 
        outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) 
        return 
    end 
  
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName ( thePlayer ) 
    outputChatBox ( "#009BFFGlobalChat: #FFFFFF".. name ..": #99FF00".. message, getRootElement(), 255, 255, 255, true ) 
end 
addCommandHandler ( "global", globalMessage ) 

Link to comment
function globalMessage ( thePlayer, cmd, ... ) 
    if isPlayerMuted ( thePlayer ) then 
        outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) 
        return 
    end 
  
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName ( thePlayer ) 
    outputChatBox ( "#00FF00Global: #FFFFFF".. name ..": #99FF00".. message, getRootElement(), 255, 255, 255, true ) 
end 
addCommandHandler ( "global", globalMessage ) 

Thanks.

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...