Updated docs. Minior fixes. Changed class dumping commands to admin commands.

This commit is contained in:
richard 2009-10-10 23:28:54 +02:00
parent d030fe573d
commit 2389ad875b
2 changed files with 89 additions and 4 deletions

View File

@ -5,7 +5,7 @@
Targets plugin version 3.0.0 Beta 2, (not released)
Written by Richard Helgeby
Manual last modified: 2009.07.25
Manual last modified: 2009.10.10
===============================================================================
@ -43,6 +43,9 @@ INDEX
3.7.4 . . . Class Console Variables
3.7.5 . . . Modifying Class Attributes
3.7.6 . . . Attribute Multipliers
3.7.7 . . . Reload Attributes
3.7.8 . . . Dumping Attributes
3.7.9 . . . Dumping Multipliers
3.8 . . . Weapon Configuration
3.8.1 . . . Attributes
3.8.2 . . . Weapon List
@ -903,6 +906,9 @@ Class console variables:
This setting overrides zr_classes_default_*, but on first-time
connecting players the default classes are assigned.
This setting also override zr_classes_*_select. If players have saved
class indexes in cookies they will be restored.
Options:
0 or 1
@ -946,6 +952,34 @@ Class console variables:
class.
"default" - Use the default class in the class configuration.
"random" - Select a random class from the class configuration.
zr_classes_zombie_select 1
---------------------------------------------------------------------------
Allow players to select zombie classes. Disable this option to force
certain classes on players depending on what zr_classes_default_zombie
is set to.
Options:
0 or 1
zr_classes_human_select 1
---------------------------------------------------------------------------
Allow players to select human classes. Disable this option to force
certain classes on players depending on what zr_classes_default_human
is set to.
Options:
0 or 1
zr_classes_admin_select 1
---------------------------------------------------------------------------
(Incomplete feature! This setting is ignored.)
Allow admins to select admin classes. Disable this option to force
certain classes on admins depending on what zr_classes_default_admin
is set to, - and if admin mode is enabled on the player.
Options:
0 or 1
3.7.5 MODIFYING CLASS ATTRIBUTES
@ -1024,6 +1058,57 @@ aren't saved. The menu is useful for finding the correct value, and then use it
in a map configuration file.
3.7.7 RELOAD ATTRIBUTES
While testing or adjusting class attributes they must be reloaded before they
will take effect. This only applies to players who already is the same class.
Syntax:
===========================================================================
zr_class_reload <target>
---------------------------------------------------------------------------
Refreshes the player cache and reloads class attributes on one or more
players.
Parameters:
target Target player(s) to refresh cache on.
3.7.8 DUMPING ATTRIBUTES
For debug purposes class attributes can be dumped.
Syntax:
===========================================================================
zr_class_dump <cachetype> <index|targetname>
---------------------------------------------------------------------------
Dumps class data at a specified index in the specified cache.
Parameters:
cachetype Cache to read from. Cache types:
"original" - Unmodified raw class data.
"modified" - Modified class data with multipliers.
"player" - Player cache, with multipliers.
index|targetname Class index, or name of player if "player" cache
type is used.
3.7.9 DUMPING MULTIPLIERS
Dumping multipliers is another command for debug purposes. It will dump the
current state of multipliers.
Syntax:
===========================================================================
zr_class_dump_multipliers <team>
---------------------------------------------------------------------------
Dumps class attribute multipliers for the specified team.
Parameters:
team The multiplier set to dump. Valid options are:
"humans" or "zombies"
3.8 WEAPON CONFIGURATION
---------------------------

View File

@ -31,8 +31,8 @@ ClassOnCommandsCreate()
RegConsoleCmd(SAYHOOKS_KEYWORD_ZCLASS, ZClassCommand, "Opens class selection menu.");
// Create base class commands.
RegConsoleCmd("zr_class_dump", ClassDumpCommand, "Dumps class data at a specified index in the specified cache. Usage: zr_class_dump <cachetype> <index|targetname>");
RegConsoleCmd("zr_class_dump_multipliers", ClassDumpMultipliersCommand, "Dumps class attribute multipliers for the specified team. Usage: zr_class_dump_multipliers <\"zombies\"|\"humans\">");
RegAdminCmd("zr_class_dump", ClassDumpCommand, ADMFLAG_GENERIC, "Dumps class data at a specified index in the specified cache. Usage: zr_class_dump <cachetype> <index|targetname>");
RegAdminCmd("zr_class_dump_multipliers", ClassDumpMultipliersCommand, ADMFLAG_GENERIC, "Dumps class attribute multipliers for the specified team. Usage: zr_class_dump_multipliers <\"zombies\"|\"humans\">");
RegAdminCmd("zr_class_modify", ClassModifyCommand, ADMFLAG_CONFIG, "Modify class data on one or more classes. Usage: zr_class_modify <classname|\"zombies\"|\"humans\"|\"admins\"> <attribute> <value> [is_multiplier]");
RegAdminCmd("zr_class_set_multiplier", ClassSetMultiplierCommand, ADMFLAG_CONFIG, "Sets the multiplier on a class attribute. Usage: zr_class_set_multiplier <\"zombies\"|\"humans\"> <attribute> <value>");
RegAdminCmd("zr_class_reload", ClassReloadCommand, ADMFLAG_GENERIC, "Refreshes the player cache and reloads class attributes on one or more players. Usage: zr_class_reload <target>");
@ -135,7 +135,7 @@ public Action:ClassDumpCommand(client, argc)
// Check if failed.
if (index < 0)
{
ReplyToCommand(client, "Invalid target name.");
// Note: FindTarget automatically write error messages.
return Plugin_Handled;
}
}