-.Paradox.- Posted July 21, 2013 Share Posted July 21, 2013 Hello, can somebody tell me the location of /me command, i want change the color of it. Link to comment
Tete omar Posted July 21, 2013 Share Posted July 21, 2013 Use: onPlayerCommand cancelEvent addCommandHandler outputChatBox With these, you can do a custom /me message. Link to comment
-.Paradox.- Posted July 21, 2013 Author Share Posted July 21, 2013 Can you post an example code? and thanks. Link to comment
TAPL Posted July 22, 2013 Share Posted July 22, 2013 @Tete, you can't do it with these function. @StevyDK, you have to use the event onPlayerChat. addEventHandler("onPlayerChat", root, function(msg, msgType) if msgType == 1 then cancelEvent() outputChatBox("* "..getPlayerName(source).." Say "..msg, root, 255, 255, 255) end end) Link to comment
Tete omar Posted July 22, 2013 Share Posted July 22, 2013 @Tete, you can't do it with these function.@StevyDK, you have to use the event onPlayerChat. addEventHandler("onPlayerChat", root, function(msg, msgType) if msgType == 1 then cancelEvent() outputChatBox("* "..getPlayerName(source).." Say "..msg, root, 255, 255, 255) end end) Why can't i? Link to comment
-.Paradox.- Posted July 22, 2013 Author Share Posted July 22, 2013 Be sure it's server side. Thanks working now 100% Thanks bro, and ramdan kareem. Link to comment
TAPL Posted July 22, 2013 Share Posted July 22, 2013 @Tete, you can't do it with these function.@StevyDK, you have to use the event onPlayerChat. addEventHandler("onPlayerChat", root, function(msg, msgType) if msgType == 1 then cancelEvent() outputChatBox("* "..getPlayerName(source).." Say "..msg, root, 255, 255, 255) end end) Why can't i? Simply because you will cancel the command 'me' with the event onPlayerCommand so that you won't be able to use it anymore even with addCommandHandler. Be sure it's server side. Thanks working now 100% Thanks bro, and ramdan kareem. You're welcome. Link to comment
Tete omar Posted July 22, 2013 Share Posted July 22, 2013 You're right, but it won't work if the command name was a built-in command name, anyway. Link to comment
-.Paradox.- Posted July 28, 2013 Author Share Posted July 28, 2013 And i want use get player nametag color Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now