Jump to content

I am looking for a script to TAG


PanBob

Recommended Posts

addEventHandler("onPlayerChat", getRootElement(), function(msg)
	if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then
		cancelEvent()
		outputChatBox("[Admin] " .. getPlayerName(source) .. ": " .. msg, getRootElement(), 255, 255, 255, true)
	end
end)

Should work, not tested tho.

Link to comment
On 19.03.2017 at 22:13, NeXuS™ said:

addEventHandler("onPlayerChat", getRootElement(), function(msg)
	if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then
		cancelEvent()
		outputChatBox("[Admin] " .. getPlayerName(source) .. ": " .. msg, getRootElement(), 255, 255, 255, true)
	end
end)

Should work, not tested tho.

It does not work. :(

.lua:

addEventHandler("onPlayerChat", getRootElement(), function(msg)
	if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then
		cancelEvent()
		outputChatBox("[Admin] " .. getPlayerName(source) .. ": " .. msg, getRootElement(), 255, 255, 255, true)
	end
end

meta.xml:

<meta>
    <info author="PanBob" type="script" />
    <script src="tag.lua" type="server" />
</meta>


what is wrong?

Link to comment

Are ya in the Admin ACL group?

*EDIT*

Just found out that a bracket was missing.

addEventHandler("onPlayerChat", getRootElement(), function(msg)
	if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin"))) then
		cancelEvent()
		outputChatBox("[Admin] " .. getPlayerName(source) .. "#FFFFFF: " .. msg, getRootElement(), 255, 255, 255, true)
	end
end)

This one works totally fine.

  • Like 1
Link to comment
1 hour ago, NeXuS™ said:

Are ya in the Admin ACL group?

*EDIT*

Just found out that a bracket was missing.


addEventHandler("onPlayerChat", getRootElement(), function(msg)
	if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin"))) then
		cancelEvent()
		outputChatBox("[Admin] " .. getPlayerName(source) .. "#FFFFFF: " .. msg, getRootElement(), 255, 255, 255, true)
	end
end)

This one works totally fine.

THANKS BRO IT WORK ! xD +REP 

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