Jump to content

Chat com Tag


Recommended Posts

Bom, eu queria colocar Tag num chat, porém, modifiquei o outputChatBox e não consegui. alguém pode me ajudar?

Código:
 

chat_range=100 
  
function MensagemTwitter(source, cmd, ...) 
    local MessagemT = table.concat ( { ... }, " " )
    local name = getPlayerName(source);
    local getID = getElementData(source, "ID") or "N/A"
for _,v in ipairs(getElementsByType("player")) do 
    outputChatBox("*#00BFFF ᴍᴇssᴇɴɢᴇʀ - #ffffff["..getID.."] #ffffff"..name.."#FFFFFF - #FFFFFF"..MessagemT,v, 255, 255, 255, true) 
    end 
end 
addCommandHandler("Twitter",  MensagemTwitter)
  
addCommandHandler("DeepWeb", function ( source, cmd, ... )			
	local message2 = #{...} > 0 and table.concat({...}," ") or nil
	if message2 then
		for _, p in ipairs (getElementsByType("player")) do
			if hasObjectPermissionTo(p, "command.mute", true) then
				outputChatBox("*#696969 ᴅᴇᴇᴘ ᴡᴇʙ - #ffffff"..getPlayerName(source).."#696969 - #696969"..message2, p, 255, 255, 255, true)
			else
				outputChatBox("*#696969 ᴅᴇᴇᴘ ᴡᴇʙ - #696969"..message2, p, 255, 255, 255, true)
			end
		end
	else
	end
end )

addEventHandler("onPlayerJoin", getRootElement(),  
function() 
  bindKey(source, "y", "down", "chatbox", "Twitter")
end 
) 

addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() 
  for index,player in pairs(getElementsByType("player")) do 
        bindKey(player,"y", "down", "chatbox", "Twitter")
  end 
end 
) 

addEventHandler("onPlayerJoin", getRootElement(),  
function() 
  bindKey(source, "u", "down", "chatbox", "DeepWeb")
end 
) 

addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() 
  for index,player in pairs(getElementsByType("player")) do 
        bindKey(player,"u", "down", "chatbox", "DeepWeb")
  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...