Jump to content

Tag team, admin does not work, any solution?


Recommended Posts

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
			local r, g, b = getPlayerNametagColor(source)
			outputChatBox("[owner] "..getPlayerName(source)..": #FFFFFF"..getPlayerNametagColor(source)..message, root, red, green, blue, true )
			outputServerLog("[^Admin^] "..name..": "..msg)
addEventHandler('onPlayerChat', getRootElement(), Tags)


Edited by side
Link to comment
  • Scripting Moderators

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 by srslyyyy
Link to comment

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