Jump to content

Help Tag Chat


side

Recommended Posts


Hello, sorry for the inconvenience as I can implement a chat system based on ranges using

 local data = getElementData (client, "nvl")

I would appreciate the help
----------------------------------------------------------------------------

addEventHandler ( "onPlayerChat", root,
function ( msg, type )
    if isObjectInACLGroup  ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then
        cancelEvent ( )
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox ( "#FF0000*[ ADMIN ] " .. getPlayerName ( source ) .. ":#4DFF00 " .. msg, getRootElement(), r, g, b, true )
     elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) and type == 0 then   
        cancelEvent ( )
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox ( "#001FDB*[ MOD ] " .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true )
	elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) and type == 0 then   
        cancelEvent ( )
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox ( "#FF0000*[ S-MOD ] " .. getPlayerName ( source ) .. ":#FF8300 " .. msg, getRootElement(), r, g, b, true )
   elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Soporte" ) ) and type == 0 then   
        cancelEvent ( )
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox ( "#00FF00*[ SOP ] " .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true )		
	    elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Everyone" ) ) and type == 0 then   
        cancelEvent ( )
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox ( "#FF6A15*[ SOBREVIVIENTE ] " .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true )		
        end
    end
)

 

Link to comment

 

Hello thank you for responding, I am new to this and would like to know in what way I can link the ranks of a level system to chat, Survivor, Military, etc 

I appreciate if you give me an example or what arguments can I use
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...