Jump to content

Help create a new chat for admin


Lally

Recommended Posts

Posted

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!

Posted

Sorry but English is not my home.
I would like to help me create a chat for admins only occur where the commands have been executed by an admin.
 

Posted (edited)

Do you mean if an admin types in /jail or /givemoney or etc. then output it to all online admins?

Edited by NeXuS™
Posted (edited)

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
Posted (edited)

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™

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