Jump to content

Can someone please help me with this script


Dentos

Recommended Posts

its for global chat want to edit there table.concat with there rank any help much appreciated (sorry im kinda new)

function globalMessage(thePlayer, cmd, ...) 
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName(thePlayer) 
  
if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then 
   outputChatBox("#ad515a[Global]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
  
if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then 
    outputChatBox("#ad515a[Moderator]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
  
if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) then 
    outputChatBox("#ad515a[superModerator]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
 else 
 outputChatBox("#ad515a[Global]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
  
end 
end 
end     
end 
addCommandHandler("global", globalMessage) 

Link to comment
  
function globalMessage(thePlayer, cmd, ...) 
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName(thePlayer) 
  
if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then 
   outputChatBox("#ad515a[Global]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
end  
if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then 
    outputChatBox("#ad515a[Moderator]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
 end  
if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) then 
    outputChatBox("#ad515a[superModerator]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
 else 
 outputChatBox("#ad515a[Global]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
 end     
end 
addCommandHandler("global", globalMessage) 
  

Link to comment
  
function globalMessage(source, cmd, ...) 
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName(source) 
      
    if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then 
       outputChatBox("#ad515a[Admin]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) -- You wrote Global here, but i think you wanted Admin. 
       return 
    end 
      
    if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then 
        outputChatBox("#ad515a[Moderator]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
        return 
    end 
      
    if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "SuperModerator" ) ) then 
        outputChatBox("#ad515a[superModerator]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
        return 
    end 
    outputChatBox("#ad515a[Global]"..name..": #FDFDFD"..message, getRootElement(), 255, 255, 255, true) 
end 
     
addCommandHandler("global", globalMessage) 
  

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