Jump to content

Help create a new chat for admin


Lally

Recommended Posts

Hello everybody! I and I need some help with creating a chat for admins where occur every order executed by each admin. Gen as the default left it to be right in the money. If you could help me with this resource because I do not have an idea.
Thanks for all your help!

Link to comment

If you want to do as NeXuS said, you will have to create a new admin panel or, modify the inclued panel.

As you're saying, you can :

- change the color of admin messages or notifications (to make a difference)

- or create a new chatbox for admin logs

Edited by Gordon_G
Link to comment

You'll have to write a outputToAdmins function for just easier overview.

function outputToAdmins(source, commandName)
	for i, k in ipairs(getElementsByType("player")) do -- Get all the online players
		if (getElementData(k, "adminlevel") or 0) > 0 then -- Check if he is admin (Replace this line with your admin-system's level, we don't know what you are using.)
			outputChatBox(getPlayerName(source) .. " used the " .. commandName .. " command.", k, 255, 255, 255) -- Outputting that the player used the command to the chat
		end
	end
end

If this is done, you'll have to go through each command you want to be logged, and call the function with the player at arg. 1 and the command's name in arg 2.

Edited by NeXuS™
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...