Jump to content

[HELP] Admins/Staffs tag


Gat

Recommended Posts

Posted

               Hello

I wanna know how to script a tag for staffs

E.g : [IGT]Gat

Tag auto adds when a staff login.

Thats will be nice if the tag will contain staff team colour,

Special thanx

Posted

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)

 

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

Posted (edited)
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
Posted
12 hours ago, MIKI785 said:

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

he told [IGT] tag for staffs also he change the group admin to nay other staff and this not for team chat it shows global

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