From 2389ad875b9fc9e8b07805f9c39344c8fa30968c Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 10 Oct 2009 23:28:54 +0200 Subject: [PATCH] Updated docs. Minior fixes. Changed class dumping commands to admin commands. --- docs/zr_manual.txt | 87 +++++++++++++++++++++++++- src/zr/playerclasses/classcommands.inc | 6 +- 2 files changed, 89 insertions(+), 4 deletions(-) diff --git a/docs/zr_manual.txt b/docs/zr_manual.txt index 2933e1c..a655632 100644 --- a/docs/zr_manual.txt +++ b/docs/zr_manual.txt @@ -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 + --------------------------------------------------------------------------- + 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 + --------------------------------------------------------------------------- + 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 + --------------------------------------------------------------------------- + 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 --------------------------- diff --git a/src/zr/playerclasses/classcommands.inc b/src/zr/playerclasses/classcommands.inc index 0405bce..b0258e7 100644 --- a/src/zr/playerclasses/classcommands.inc +++ b/src/zr/playerclasses/classcommands.inc @@ -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 "); - 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 "); + 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 [is_multiplier]"); RegAdminCmd("zr_class_set_multiplier", ClassSetMultiplierCommand, ADMFLAG_CONFIG, "Sets the multiplier on a class attribute. Usage: zr_class_set_multiplier <\"zombies\"|\"humans\"> "); RegAdminCmd("zr_class_reload", ClassReloadCommand, ADMFLAG_GENERIC, "Refreshes the player cache and reloads class attributes on one or more players. Usage: zr_class_reload "); @@ -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; } }