Jump to content

Can i remove color coding and change RGB in /me?


Turbe$Z

Recommended Posts

Posted (edited)

You can do your own /me command.

function customMeCommand(message, messageType)
	local playerName = getPlayerName(source)
	local message = string.gsub(message, "#%x%x%x%x%x%x", "")
	if not isPedDead(source) and then
    		if messageType == 1 then
      			cancelEvent()
			outputChatBox("** " .. playerName .. " " .. message .. "", getRootElement(), 192, 162, 216, true)
		end
	end
end
addEventHandler("onPlayerChat", getRootElement(), customMeCommand)

 

Edited by Dzsozi

Your signature image is too large.

Removed

Posted
4 minutes ago, Dzsozi said:

You can do your own /me command.


function customMeCommand(message, messageType)
	local playerName = getPlayerName(source)
	local message = string.gsub(message, "#%x%x%x%x%x%x", "")
	if not isPedDead(source) and then
    		if messageType == 1 then
      			cancelEvent()
			outputChatBox("** " .. playerName .. " " .. message .. "", getRootElement(), 192, 162, 216, true)
		end
	end
end
addEventHandler("onPlayerChat", getRootElement(), customMeCommand)

 

server.lua:4: unexpected symbol near 'then', why?

My Fun server:

560x95_FFFFFF_FF9900_000000_000000.png

My DD server:

n-560x95_FFFFFF_FFFFFF_000000_000000.png

Posted

Oh sorry, I made a typo, there was an "and" before the "then".

function customMeCommand(message, messageType)
	local playerName = getPlayerName(source)
	local message = string.gsub(message, "#%x%x%x%x%x%x", "")
	if not isPedDead(source) then
    		if messageType == 1 then
      			cancelEvent()
			outputChatBox("** " .. playerName .. " " .. message .. "", getRootElement(), 192, 162, 216, true)
		end
	end
end
addEventHandler("onPlayerChat", getRootElement(), customMeCommand)

Try now please.

  • Like 1

Your signature image is too large.

Removed

Posted
1 minute ago, Dzsozi said:

Oh sorry, I made a typo, there was an "and" before the "then".


function customMeCommand(message, messageType)
	local playerName = getPlayerName(source)
	local message = string.gsub(message, "#%x%x%x%x%x%x", "")
	if not isPedDead(source) then
    		if messageType == 1 then
      			cancelEvent()
			outputChatBox("** " .. playerName .. " " .. message .. "", getRootElement(), 192, 162, 216, true)
		end
	end
end
addEventHandler("onPlayerChat", getRootElement(), customMeCommand)

Try now please.

Thank you!!! :D Now working fine. :D

  • Like 1

My Fun server:

560x95_FFFFFF_FF9900_000000_000000.png

My DD server:

n-560x95_FFFFFF_FFFFFF_000000_000000.png

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