Tnkk Posted September 8, 2019 Share Posted September 8, 2019 (edited) queria saber como faço mudar quando alguem manda uma bind ela aparacesse no chat local (T) e tbm para poder usar comandos no Thttps://imgur.com/a/6BTLTgx Script chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"t","down","chatbox","Local") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"t","down","chatbox","Local") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox(" #00ff00 ●[ Local ]● - #ffffff"..nick.."#00ff00 - #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("Local",onChat) Edited September 8, 2019 by Tnkk Link to comment
beast99 Posted September 9, 2019 Share Posted September 9, 2019 (edited) Use a função "<>" do editor de texto aqui do forum. Edited September 9, 2019 by MesaDowN Link to comment
Other Languages Moderators Lord Henry Posted September 9, 2019 Other Languages Moderators Share Posted September 9, 2019 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