Jump to content

basic /me command


Guest TheLegend

Recommended Posts

Hello,

I would like to ask you guys how could I make a /me command. I can understand it can look like that:

function me(sourcePlayer, command, who, ???) 
    -- local chat message 
    -- Display the message 
    local PlayerName = getPlayerFromNick(who) 
    local ???? 
        outputChatBox ( who .. "???" ) 
end 
  
addCommandHandler("me", me) 

I would be very greatful, if you guys can help me. I don't know how to do it ... I know that the /me command is in the rpg_services resource, but I will still like to know hot to make one, as I am very interested. Also, I would like to know how to change the color, as pink is not a good one :P

Thank you guys,

Legend

Link to comment
Erm afaik the /me command is hardcoded into mta itself. There's no need to script it^^

I know that, but I would still like to know the way it could be scripted ... It can help me make some other commands I would like. I just do not know how to input the message, like when u do /me , I would like how to input the action ... it has to be 'Name' (for example IamNoop) and action (for example sniffs) - /me sniffs = 'IamNoop sniffs' . What I dunno, is how to make the 'sniffs' part show ... Please Help me..

Regards,

Legend

Link to comment

Oh and by the way, there is a little mistake at the script:

-- Attach the 'consoleCheckParameters' function to the "check_parameters" command 
  
  
addCommandHandler ( "check_parameters", consoleCheckParamters ) 

The last word is ParaMTers ,

I think they should fix it :P

Regards,

Legend

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