Guest Posted March 31, 2008 Share Posted March 31, 2008 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 Thank you guys, Legend Link to comment
Mr.Hankey Posted March 31, 2008 Share Posted March 31, 2008 Erm afaik the /me command is hardcoded into mta itself. There's no need to script it^^ Link to comment
Guest Posted March 31, 2008 Share Posted March 31, 2008 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
50p Posted March 31, 2008 Share Posted March 31, 2008 http://development.mtasa.com/index.php? ... andHandler Go down to the examples, click on Server (orange bar) and scroll down to example 4. There is how to use something like you want, I mean it joins all of the parameters from the command and outputs it into chatbox. You wouldn't use "Parameters passed: " you'd use getClientName( playerSource ) .. " " Link to comment
Guest Posted March 31, 2008 Share Posted March 31, 2008 Okay, that solved my problem. Thank you very much Regards, Legend Link to comment
Guest Posted March 31, 2008 Share Posted March 31, 2008 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 Regards, Legend Link to comment
norby89 Posted April 1, 2008 Share Posted April 1, 2008 Oh and by the way, there is a little mistake at the script: The last word is ParaMTers , I think they should fix it ok it's fixed 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