side Posted July 19, 2021 Share Posted July 19, 2021 (edited) hello community, I have the idea of creating a chat tag for teams, admin. the is an error that prevents its function. i want to know if you can help me or explain how i can do it works. i appreciate your valuable help. function Tags (msg, type) if type == 0 local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local red, green, blue = getPlayerNametagColor(source) local playerTeam = getPlayerTeam(source) local teamName = getTeamName(playerTeam) local hex = string.format("#%.2X%.2X%.2X", r, g, b) outputChatBox(""..team.." "..hex.." "..name..": #FFFFFF"..msg.."", getRootElement(), 255, 255, 255, true) if teamName == "~STAFF" isObjectInACLGroup("user."..account, aclGetGroup("Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("[owner] "..getPlayerName(source)..": #FFFFFF"..getPlayerNametagColor(source)..message, root, red, green, blue, true ) outputServerLog("[^Admin^] "..name..": "..msg) end end ) addEventHandler('onPlayerChat', getRootElement(), Tags) Edited July 19, 2021 by side Link to comment
Scripting Moderators ds1-e Posted July 20, 2021 Scripting Moderators Share Posted July 20, 2021 (edited) From what i can see the or operator is missing here. if teamName == "~STAFF" isObjectInACLGroup("user."..account, aclGetGroup("Admin")) then It should looks like this: if teamName == "~STAFF" or isObjectInACLGroup("user."..account, aclGetGroup("Admin")) then Also you need one more end which will close function scope. Edited July 20, 2021 by srslyyyy 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