Jump to content

Como coloco para aparece tag criada na acl, junto nesse outputChatBox?


Recommended Posts

function MensagemMessenger(source, cmd, ...) 
    local MessagemM = table.concat ( { ... }, " " )
    local name = getPlayerName(source); 
for _,v in ipairs(getElementsByType("player")) do 
    outputChatBox("#FFFFFF◈➤BMO #FFA500 #FFFFFF◈ #1170C9["..chat1.."] #FFFFFF["..getElementData(source, "ID").."] "..getPlayerName(source).." :#ffffff "..MessagemM,v, 255, 255, 255, true)
	end
end 
addCommandHandler("Messenger",  MensagemMessenger)

 

Link to comment

Se este script roda server-side, você vai precisar verificar o grupo do jogador antes de enviar a mensagem. Por exemplo:
 

local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "SEU GRUPO VEM AQUI" ) ) then

E aí, se ele estiver nesse grupo, ele envia a mensagem com a tag dele já na outputChatBox... Assim:

 

if isObjectInACLGroup ("user."..accName, aclGetGroup ( "tag.dono" ) ) then
		outputChatBox ( "#000000║#ffffff✘ #ff0000DONO #ffffff✘#000000║ - #ffffff" ..getPlayerName(source).. "#ffffff™: " ..message , thePlayer, 255, 255, 255, true )
	end



Para mais de um grupo, adicione else's, assim:
 

	if isObjectInACLGroup ("user."..accName, aclGetGroup ( "tag.dono" ) ) then
		outputChatBox ( "#000000║#ffffff✘ #ff0000DONO #ffffff✘#000000║ - #ffffff" ..getPlayerName(source).. "#ffffff™: " ..message , thePlayer, 255, 255, 255, true )
	else

	if isObjectInACLGroup ("user."..accName, aclGetGroup ( "tag.subdono" ) ) then
		outputChatBox ( "#000000║#ffffff✘ #ff0000SUB DONO #ffffff✘#000000║ - #ffffff" ..getPlayerName(source).. "#ffffff™: " ..message , thePlayer, 255, 255, 255, true )
	else
    
    -- [...]

 

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