Jump to content

How make !command instead of /command?


Carbonik

Recommended Posts

You need to catch every chat message (onPlayerChat event) then make a string.match (more info | even more info) to check if first letter is a "!" and get the rest of the chat input (command and arguments). Hide message with cancelEvent and do your actions based of command and arguments extracted from chat message.

Also searching before asking is a good idea, because this was asked so many times already..

Also making command with exclamation mark at the beginning instead of slash is unnatural (from DOS times it's natural to pass arguments after slash!), uncommon (I think only 2-3 servers are using this.. Most players will just get confused) and just weird. And complicates the scripts.

Link to comment
  • 2 weeks later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...