Jump to content

About MTA commands


Recommended Posts

I've seen that /whowas and /whois is not an admin panel command, it is somewhere in MTA. I want to change the output of /whois and /whowas. Is there anyway I can change it? If I use onPlayerCommand and cancel event if the command is /whowas then will it also cancel if I create my own /whowas?

Link to comment

As far as I know you can't really override hardcoded MTA commands. But you can do what you said and it won't cancel anything before cancelEvent() so you can still override it that way:

function cmds(cmd) 
    if cmd == "whois" then 
        outputChatBox("hello",source) 
        cancelEvent() 
    elseif cmd == "whowas" then 
        outputChatBox("bye",source) 
        cancelEvent() 
    end 
end 
addEventHandler("onPlayerCommand",root,cmds) 

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