Jump to content

Radio chat


igthomas

Recommended Posts

function radioChat(thePlayer, cmd, ...) 
    local msg = table.concat({...}, " ") 
    if (msg and msg ~= "") then 
        outputChatBox("(Radio)".. getPlayerName(thePlayer) ..": ".. msg ..", over.",root,255,50,0,true) 
    end 
end 
addCommandHandler("Radio",radioChat) 
  
addEventHandler("onPlayerJoin",root, 
    function () 
        bindKey(source,"R","down","chatbox","Radio") 
    end 
) 
  
addEventHandler("onResourceStart",resourceRoot, 
    function () 
        for index, player in ipairs(getElementsByType("player")) do 
            bindKey(player,"R","down","chatbox","Radio") 
        end 
    end 
) 

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...