Gat Posted April 19, 2018 Posted April 19, 2018 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
Sami_~> Posted April 19, 2018 Posted April 19, 2018 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)
MIKI785 Posted April 19, 2018 Posted April 19, 2018 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.
LilDawage Posted April 19, 2018 Posted April 19, 2018 (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 April 19, 2018 by LilDawage
Sami_~> Posted April 20, 2018 Posted April 20, 2018 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
Gat Posted April 23, 2018 Author Posted April 23, 2018 Thnx all i scripted it, +i didn't want a tag in chat only, btw i done it
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now