Jump to content

/me command


SpecT

Recommended Posts

You'll need to re-script it.

Functions/Events

onPlayerChat 
cancelEvent 
getPlayerName 
outputChatBox 
addCommandHandler -- optional 

e.g

addEventHandler("onPlayerChat", getRootElement(), function(msg, msgType) 
     if msgType == 1 then 
          cancelEvent() 
          outputChatBox(getPlayerName(source)..": "..msg) 
     end 
end) 

Link to comment
  
addEventHandler("onPlayerChat", getRootElement(), function(msg, msgType) 
     if msgType == 1 then 
          cancelEvent() 
          local playerName = string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "") 
          local message = msg:gsub("#%x%x%x%x%x%x", "") 
          outputChatBox("*"..playerName.." "..message) 
     end 
end) 
  

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