Jump to content

[DUVIDA] Chat anonimo para STAFF


Recommended Posts

Olá tenho um chat anonimo aqui e sempre vejo alguns players aproveitando ele para pode xingar e divulga e eu queria sabe ,como faço para quem tiver da ACL : STAFF vai mostrar assim [Anonimo] Nick - mensagem

Bom aqui server-side
 

addCommandHandler( "an", function ( source, cmd, ... )			
	local message2 = #{...} > 0 and table.concat({...}," ") or nil
	if message2 then
		outputChatBox("#ffffff[ #696969 Anônimo #ffffff] #696969 - "..message2, root, 255, 255, 255, true)
	else
		outputChatBox( "[/"..cmd.."]: Digite uma mensagem!", source, 230, 20, 20 )
	end
end )

 

Link to comment
addCommandHandler( "an", 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("#ffffff[ #696969 Anônimo #ffffff] "..getPlayerName(source).."#696969 - "..message2, p, 255, 255, 255, true)
			else
				outputChatBox("#ffffff[ #696969 Anônimo #ffffff] #696969 - "..message2, p, 255, 255, 255, true)
			end
		end
	else
		outputChatBox( "[/"..cmd.."]: Digite uma mensagem!", source, 230, 20, 20 )
	end
end )

 

  • Thanks 2
Link to comment
  • 6 months later...
  • Moderators
On 26/09/2019 at 23:23, K13 said:

Como que faz para adc o ID do player EX: [Anonimo] Nick ID- mensagem Obrigado se responder ❤️

Você vai precisar de um sistema de ID, daí basta usar getElementData para retornar o id do player. Aqui no fórum tem tópicos relacionado e com esse script e funções de ID.

  • Thanks 1
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...