Gat

[HELP] Admins/Staffs tag

Recommended Posts

               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

Share this post


Link to post

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)

 

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post

Thnx all i scripted it, +i didn't want a tag in chat only, btw i done it

Share this post


Link to post

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.