Gat Posted April 19, 2018 Share 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 Link to comment
Sami_~> Posted April 19, 2018 Share 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) Link to comment
MIKI785 Posted April 19, 2018 Share 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. Link to comment
LilDawage Posted April 19, 2018 Share 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 Link to comment
Sami_~> Posted April 20, 2018 Share 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 Link to comment
Gat Posted April 23, 2018 Author Share Posted April 23, 2018 Thnx all i scripted it, +i didn't want a tag in chat only, btw i done it Link to comment
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