Jump to content

[HELP] Please


1LoL1

Recommended Posts

Hi, I would need help .. this can be done Admin Chat so that I can write only admins and players are not? please help.

-- Client

bindKey("x", "down", "chatbox", "global") 

-- server

function globalMessage ( thePlayer, cmd, ... ) 
    if isPlayerMuted ( thePlayer ) then 
        outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) 
        return 
    end 
  
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName ( thePlayer ) 
    outputChatBox ( "#00FF00global chat: #FFFFFF".. name ..": #FFFF00".. message, getRootElement(), 255, 255, 255, true ) 
end 
addCommandHandler ( "global", globalMessage ) 

Link to comment
function globalMessage ( thePlayer, cmd, ... ) 
accountname = getAccountName(getPlayerAccount(thePlayer)) 
if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then 
    if isPlayerMuted ( thePlayer ) then 
        outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) 
        return 
    end 
  
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName ( thePlayer ) 
    outputChatBox ( "#00FF00global chat: #FFFFFF".. name ..": #FFFF00".. message, getRootElement(), 255, 255, 255, true ) 
end 
addCommandHandler ( "global", globalMessage ) 

Link to comment
function globalMessage ( thePlayer, cmd, ... ) 
accountname = getAccountName(getPlayerAccount(thePlayer)) 
if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then 
    if isPlayerMuted ( thePlayer ) then 
        outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) 
        return 
    end 
  
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName ( thePlayer ) 
    outputChatBox ( "#00FF00global chat: #FFFFFF".. name ..": #FFFF00".. message, getRootElement(), 255, 255, 255, true ) 
end 
addCommandHandler ( "global", globalMessage ) 

It is not .. but it was written so that even AdminChat: text. I tried everything but nothing .. and that's seen players .. what I write admins

Link to comment
  • 2 weeks later...

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