Jump to content

Chat System


Recommended Posts

On 21/06/2020 at 14:44, MrKAREEM said:

você pode criar seu bate-papo personalizado com :

AddCommandHandler

GetPlayerName

OutputChatBox

faça o script no servidor e a mensagem aparecerá para todos os jogadores

Beauty obg

and that I'm new to this script, so I need help with the script

1 minute ago, Dadinho12 said:

Beleza obg

e que eu sou novo nesse script, então preciso de ajuda com o script

and that I'm new to this script, so I need help with the script

Link to comment

server :

local chat = 'Local'
local command = 'chat'

addCommandHandler(command,
function(player,_,...)
    if not player then return end
      if isPlayerMuted ( player ) then return outputChatBox('you are muted!',player,255,255,0) end
      local arg = {...}
	  local count = #arg
	  if count < 1 then return outputChatBox('the messeage must be 1 line at least!',player,255,0,0) end
      local string = table.concat( arg, " " )
	  local r,b,g = getPlayerNametagColor(player)
	  if r and b and g then
      outputChatBox ( '('..chat..'): '..string.format("#%.2X%.2X%.2X", r, g, b)..''..string.gsub(getPlayerName(player),'#x%x%x%x%x%x%','')..'#FFFFFF : '..string, root, 255,255,255, true )
      else
      outputChatBox ( '('..chat..'): '..string.gsub(getPlayerName(player),'#x%x%x%x%x%x%','')..' : '..string, root, 255,255,255, true )  
      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...