DSC-L|Gr00vE[Ger] Posted February 21, 2008 Share Posted February 21, 2008 Hey everyone out there, here´s my next request : i want to have the well-knowned "!addcommand !commandname REAKTION" command in mta : dm i think everybody of you know it from mta : race ^^ could somebody try to make this for mta : dm ? MFG + THX Gr00vE Link to comment
eAi Posted February 21, 2008 Share Posted February 21, 2008 Not entirely sure what you mean? Link to comment
50p Posted February 21, 2008 Share Posted February 21, 2008 Not entirely sure what you mean? Me neither. Link to comment
Scooby Posted February 22, 2008 Share Posted February 22, 2008 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
Oli Posted February 22, 2008 Share Posted February 22, 2008 well just create a database of the commands and a function to loop through em in the command handler and return the appropriate result.. Link to comment
norby89 Posted February 22, 2008 Share Posted February 22, 2008 (edited) CODE REMOVED (check next post) note: it's not tested so I guarantee it doesn't work Edited February 22, 2008 by Guest Link to comment
Oli Posted February 22, 2008 Share Posted February 22, 2008 dude.. how is that gonna remember the commands if the script is unloaded and loaded or the server is restarted? peachy Link to comment
norby89 Posted February 22, 2008 Share Posted February 22, 2008 (edited) 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 February 23, 2008 by Guest Link to comment
DSC-L|Gr00vE[Ger] Posted February 22, 2008 Author Share Posted February 22, 2008 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... ^^ Link to comment
norby89 Posted February 23, 2008 Share Posted February 23, 2008 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
DSC-L|Gr00vE[Ger] Posted February 23, 2008 Author Share Posted February 23, 2008 thx for fixxing norby, now everything works fine^^ ... Link to comment
norby89 Posted February 23, 2008 Share Posted February 23, 2008 added a few things to it and made it nicer: http://mtabeta.com/index.php?p=resource ... ails&id=67 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