igthomas Posted February 20, 2012 Share Posted February 20, 2012 I want to make a chat like mainchat but when you press R it is Orange and begins like **(Radio)Name: Text, over** and I don't know how to do it Could you guys at least give me what function should I use please Link to comment
Castillo Posted February 20, 2012 Share Posted February 20, 2012 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
igthomas Posted February 20, 2012 Author Share Posted February 20, 2012 haha Thanks it works Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now