Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

amx_definitions ("knowledge base")

by Hood [10th MD] · 2008-03-31 · 2 replies · 4373 views · 33 downloads

Read the thread (3 posts)

From the first post

This is based off of an idea from irc bots, but also there's a source mod plugin that exists to do this, but I've found no amxx equivalent.
n
nWhat the plugin does:
nthe plugin is basically a dictionary - users can store, look up, delete and re-define terms.
nfor example, if you wanted to have your clan website stored, you can define it, and users can look it up.
nThe plugin allows for both console commands and say commands.
n
n
Commands:ndict_lookup - displays a term's definitionndict_define - defines a new termndict_redefine - redefines an existing termndict_delete - deletes a termndict_list - lists all terms in consolennSay Commands:n? - displays definition (looks up)n!define - definesn!redefine - redefinesn!delete - deletesn!undefine - deletesn!list - lists in console
max term length is 31 chars, max def. length is 63 - resize arrays if you want more. All commands support multi-word terms and definitions as long as you use quotes, except looking up multi-word terms which does not require quotes.
n
nExamples:
n!define "dod plugins" "dodplugins.net for all your dod plugin needs!"
ndod plugins? [this will print a message to the server displaying dod plugins = dodplugins.net ...]
n(see source for exact message format / wording)
n
nthis requires you to create a .ini file in your /configs folder to hold the info. terms and definitions are separated by a * if you wish to pre-make a list (i.e.
ndod plugins*dodplugins.net ... - the name of this file can be changed along with the access levels for various commands in the #define section.
n

n
nFinal note... as of this release (v 1.2), the delete function simply replaces the line with a blank character. If anyone knows how to delete a line so that the file doesn't have blank lines (it doesn't really matter, it's just unnecessary), please let me know! Plugin is well tested and stable, I've had no problems and been messing with it for at least a week.
n
nComments, etc. welcome. Questions too if this was a bad explanation.

Files

amx_definitions.sma Plugin Source 9 KB 33 dl Download Compile

The thread

All 3 posts from 2 people on amx_definitions ("knowledge base"), kept as they were written.

H Hood [10th MD]
started this thread
Posts: 84
Threads: 7
Joined: Nov 2006
03-31-2008, 06:20 PM #1

This is based off of an idea from irc bots, but also there's a source mod plugin that exists to do this, but I've found no amxx equivalent.nnWhat the plugin does:nthe plugin is basically a dictionary - users can store, look up, delete and re-define terms.nfor example, if you wanted to have your clan website stored, you can define it, and users can look it up.nThe plugin allows for both console commands and say commands.nn

Commands:ndict_lookup <term> - displays a term's definitionndict_define <term> <definition> - defines a new termndict_redefine <term> <new definition> - redefines an existing termndict_delete <term> - deletes a termndict_list - lists all terms in consolennSay Commands:n<term>? - displays definition (looks up)n!define <term> - definesn!redefine <term> <new definition> - redefinesn!delete <term> - deletesn!undefine <term> - deletesn!list - lists in console
max term length is 31 chars, max def. length is 63 - resize arrays if you want more. All commands support multi-word terms and definitions as long as you use quotes, except looking up multi-word terms which does not require quotes.nnExamples:n!define "dod plugins" "dodplugins.net for all your dod plugin needs!"ndod plugins? [this will print a message to the server displaying dod plugins = dodplugins.net ...]n(see source for exact message format / wording)nnthis requires you to create a .ini file in your /configs folder to hold the info. terms and definitions are separated by a * if you wish to pre-make a list (i.e.ndod plugins*dodplugins.net ... - the name of this file can be changed along with the access levels for various commands in the #define section.nnnFinal note... as of this release (v 1.2), the delete function simply replaces the line with a blank character. If anyone knows how to delete a line so that the file doesn't have blank lines (it doesn't really matter, it's just unnecessary), please let me know! Plugin is well tested and stable, I've had no problems and been messing with it for at least a week.nnComments, etc. welcome. Questions too if this was a bad explanation.

Wilson [29th ID]
posted here
Posts: 623
Threads: 57
Joined: Oct 2005
04-01-2008, 11:08 AM #2

haha, that's a cool idea LT. nice work.

H Hood [10th MD]
started this thread
Posts: 84
Threads: 7
Joined: Nov 2006
04-04-2008, 12:34 AM #3

Haha, it makes me really happy.nI will eventually get it just right, but it's a lot of fun, and great for getting people info since they often accidentally lookup something, or have repeated questions. i.e. weapons mod, etc heh

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC