Jump to content

[REQ] : ! or /addcommand


Recommended Posts

i think he means like, an admin can type: !addcommand !lol laughs out loud

then when people type !lol, it says laughs out loud

!addcommand !web

!addcommand !rules

etc...

this way, admins can easily add various commands to display custom text.

Link to comment

CODE MOVED TO:

http://mtabeta.com/index.php?p=resource ... ails&id=67

commands are:

/addcommand !<commandname> <text> 
/delcommand !<commandname> 
  
!<commandname> [optional text] 

examples:

/addcommand !fire I'm hot

!fire -> "I'm hot"

/addcommand !slap was slapped around a bit with a large trout

!slap meany admin -> "meany admin was slapped around a bit with a large trout

the custom commands are stored in a serverfile, each player (nickname) has its own commands, also note that you can provide an optional text when using a command that is written in front of the message (see 2nd example)

have fun! ;)

Edited by Guest
Link to comment
thx norby, your script works ! ^^ :) but the command /delcommand doesn´t work and i think it would be better when only admins can use this command... ^^

if you want to restrict the command all you need to do is add a 'true' to the end of the hander like this:

addCommandHandler ( "delcommand", delCommand, true ) 

I'll fix 'delcommand' in a min

EDIT: code is updated, check previous post

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