TorNix~|nR Posted December 12, 2015 Share Posted December 12, 2015 hello everyone I need a Chat for teams, can help me? for example I go to team Military in scoreboard I need to have for exp the tag [MILITAR] please anyone can help? and thanks Link to comment
iPrestege Posted December 12, 2015 Share Posted December 12, 2015 hello everyoneI need a Chat for teams, can help me? for example I go to team Military in scoreboard I need to have for exp the tag [MILITAR] please anyone can help? and thanks You mean that you want if the player was in police team if he talks in the chat show like [Police] PlayerName : XXXXXXXXDDDDDD if like that then make your own script Link to comment
TorNix~|nR Posted January 14, 2016 Author Share Posted January 14, 2016 You can help me please? Link to comment
Dealman Posted January 15, 2016 Share Posted January 15, 2016 Use the event onPlayerChat, then check their team using getPlayerTeam and getTeamName. If they're in a team, cancel the event and apply the tag you want and use outputChatBox. Link to comment
1LoL1 Posted January 15, 2016 Share Posted January 15, 2016 addEventHandler("onPlayerChat", getRootElement(), function(msg, type) if type == 0 then cancelEvent() local name = getPlayerName(source) local r, g, b = getPlayerNametagColor(source) local players = getPlayerTeam(source) local team = getTeamName(players) local hex = string.format("#%.2X%.2X%.2X", r, g, b) outputChatBox(""..team.." "..hex.." "..name..": #FFFFFF"..msg.."", getRootElement(), 255, 255, 255, true) end end ) Link to comment
1LoL1 Posted January 15, 2016 Share Posted January 15, 2016 addEventHandler("onPlayerChat", getRootElement(), function(msg, type) if type == 0 then cancelEvent() local name = getPlayerName(source) local r, g, b = getPlayerNametagColor(source) local players = getPlayerTeam(source) local team = getTeamName(players) local hex = string.format("#%.2X%.2X%.2X", r, g, b) outputChatBox(""..team.." "..hex..name..": #FFFFFF"..msg.."", getRootElement(), 255, 255, 255, true) end end ) 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