1. Open MTA Script Editor / Notepad ++
2. Copy and Make meta
3. Copy and Paste The Server Side
Meta:
Server Side:
addEventHandler ( "onPlayerChat", root,
function ( msg, type )
if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Console" ) ) and type == 0 then
cancelEvent ( )
local r, g, b = getPlayerNametagColor(source)
outputChatBox ( "#999999*[Console] " .. getPlayerName ( source ) .. ":#02FAC8 " .. msg, getRootElement(), r, g, b, true )
elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Supervisor" ) ) and type == 0 then
cancelEvent ( )
local r, g, b = getPlayerNametagColor(source)
outputChatBox ( "#FFB818*[Admin] " .. getPlayerName ( source ) .. ":#02FAC8 " .. msg, getRootElement(), r, g, b, true )
elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Head-Admin" ) ) and type == 0 then
cancelEvent ( )
local r, g, b = getPlayerNametagColor(source)
outputChatBox ( "#FF00FF*[Head Admin] " .. getPlayerName ( source ) .. ":#FFFF00 " .. msg, getRootElement(), r, g, b, true )
elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then
cancelEvent ( )
local r, g, b = getPlayerNametagColor(source)
outputChatBox ( "#7777FF*[Admin] " .. getPlayerName ( source ) .. ":#FFFF00 " .. msg, getRootElement(), r, g, b, true )
elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Help" ) ) and type == 0 then
cancelEvent ( )
local r, g, b = getPlayerNametagColor(source)
outputChatBox ( "#FF0000*[Help] " .. getPlayerName ( source ) .. ":#FFFF00 " .. msg, getRootElement(), r, g, b, true )
end
end
)
-- Edit the stuff that says "outputChatBox ( "Help")" etc
Copy and paste this code.
elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "ACLgroup" ) ) and type == 0 then
cancelEvent ( )
local r, g, b = getPlayerNametagColor(source)
outputChatBox ( "#FF0000*[Name] " .. getPlayerName ( source ) .. ":#FFFF00 " .. msg, getRootElement(), r, g, b, true )
To add new tags.