Well I'm finally ready to release this. I'll let the readme do the talking:
Code:
== admin_mm ==
About:
admin_mm is a simple and lean administration plugin for HL2 that works with
almost any mod. The Linux version is special in that it requires no special
offset settings or seperate binaries for each mod, and doesn't need updating
when mod updates come out. The Windows version on the other hand is a bit
gimped right now. It will never be quite like the Linux version, but adding
similar support is planned.
The catch to all of this is that if you're using the Windows version, it
/should/ work on most mods, but commands like admin_spawn will not work.
Those commands use functions defined by the mod and not the engine.
And besides the commands themselves, each command that takes a player name
uses the same format seen in the NemoD plugin. It matches strings within
player names, and takes the following special keywords:
#a - Affects all players
#t[index] - Affects specified team e.g. #t1
#[userid] - Affects specified player by userid, e.g. #123
#STEAM_[id] - Affects specified player by Steam ID, e.g.
#STEAM_0:1:2345
If you don't use a keyword and you do something like "admin_slay j", it'll
slay everyone with the letters j or J in their name.
Oh, and the plugin is by me, dackz. My site is dackz.net, but the place
is a bit low on content at the moment.
History:
Version 1 - First release!
Release Notes:
As of version 1, only the following commands work in the Windows version:
admin_slay
admin_exec
admin_kick
admin_ban
admin_gag
admin_team
admin_swapteams
admin_cvar
admin_status
Also note that none of the commands affect bots (because it's potentially
unsafe).
Commands:
The console command "find admin_" says this:
"admin_help"
- Prints help message
"admin_slay"
- <name> - Slays specified player(s)
"admin_slap"
- <name> [amount] - Slaps specified player(s)
"admin_exec"
- <name> <command> - Executes specified command on specified player(s)
"admin_teleport"
- <name> <x> <y> <z> - Teleports specified player(s)
"admin_kick"
- <name> [reason] - Kicks specified player(s)
"admin_ban"
- <name> <minutes> [reason] - Bans specified player(s)
"admin_health"
- <name> <amount> - Adds health to specified player(s)
"admin_model"
- <name> <model> - Sets model of specified player(s)
"admin_freeze"
- <name> <1/0/on/off> - Freezes or unfreezes specified player(s)
"admin_speedy"
- <name> <1/0/on/off> - Possibly makes player(s) run faster
"admin_noclip"
- <name> <1/0/on/off> - Enables or disables noclip for specified player(s)
"admin_gag"
- <name> <1/0/on/off> [text/radio/all] - Enables or disables specified
player(s) from using text or radio
chat.
"admin_url"
- <name> <url> [hidden: 0/1] - Opens MOTD to specified URL for specified
player(s)
"admin_team"
- <name> <index> - Changes team of specified player(s)
"admin_class"
- <name> <index> - Changes class of specified player(s) (DOD)
"admin_give"
- <name> <item> [subtype] - Gives item to specified player(s)
"admin_remove"
- <name> <item> - Removes item from specified player(s)
"admin_ammo"
- <name> <ammo name/index> <amount> - Gives ammo to specified player(s)
"admin_spawn"
- <name> - Respawns specified player(s)
"admin_swapteams"
- <index> <index> - Swaps specified teams
"admin_cvar"
- <name> <cheat: 0/1/on/off> <notify: 0/1/on/off> <min: number/off>
<max: number/off> - Changes settings for specified convar
"admin_restrict"
- <item> <1/0/on/off> - Restricts specified players from having specified item
"admin_restrictions"
- Prints item restrictions
"admin_status"
- <name> - Prints specified players' restrictions, gags, and other stuff
The plugin isn't stable yet though. I'd consider it beta, so don't run it on production servers unless you're feeling daring. The Windows version should be pretty stable though as it doesn't do many interesting things right now, and the Linux version has been working just fine for me, but I haven't tested it in any setting other than my own.
The next version will have per-player weapon restrictions, the ability to get information about the owner of the spray nearest to you, and some other things I'm forgetting. The Windows version will eventually support at least CS:S, DOD:S and HL2:DM. The weapon restrictor will eventually be able to detect when someone picks up an item in mods other than CS:S (DOD:S and HL2:DM have no item_pickup event) and it might eventually be able to block rebuy commands that purchase blocked weapons (right now it'll just let you buy it, then immediately take it away from you.)
I'll be releasing the source code in a bit; I just need to clean up and comment the code. If anyone wants to submit patches or try to add better Windows support, feel free, but make sure to post the patch in this thread.
Also, admin_restrict will only accept valid entity names and will not check to see if the name is actually an item, so make sure you check beforehand. You can generally find weapon names in the mod/scripts/ folder. If you want to restrict hegrenades in CS:S, you'd do "admin_restrict weapon_hegrenade 1". If you want to restrict spades in DOD:S, you'd do "admin_restrict weapon_spade 1".
Downloads:
http://dackz.net/projects/admin_mm/