Jump to content

[HELP] Admins/Staffs tag


Gat

Recommended Posts

Server Side 


function RenderIGTTag( text, type)
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then
      cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("[IGT]" .. getPlayerName ( source ) ..":#FFFFFF " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [IGT] " .. getPlayerName ( source ) .. ": " .. text)
    end
end
addEventHandler("onPlayerChat", getRootElement(), RenderIGTTag)

 

Link to comment
11 hours ago, Sami_~> said:

Server Side 


function RenderIGTTag( text, type)
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then
      cancelEvent()
        local r, g, b = getPlayerNametagColor(source)
        outputChatBox("[IGT]" .. getPlayerName ( source ) ..":#FFFFFF " .. text, getRootElement(), r, g, b, true )
        outputServerLog("CHAT: [IGT] " .. getPlayerName ( source ) .. ": " .. text)
    end
end
addEventHandler("onPlayerChat", getRootElement(), RenderIGTTag)

 

You didn't check for type, so you just made teamchat useless for people in Admin group.

Link to comment
function getPlayerTag ( player )
    local tag = ""
    if getTeamName(getPlayerTeam(player)) == "Staff"  then -------------------------------idk your team staff name : Admins or Staff just change it 
        tag = tag.."[IGT]"
    end
    
    return tag
end

 

Edited by LilDawage
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...