diff --git a/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg b/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg
index b41affd..808eb8a 100644
--- a/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg
+++ b/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg
@@ -160,6 +160,10 @@ zr_classes_menu_spawn "0"
// Default: "0"
zr_classes_menu_join "0"
+// Automatically close class selection menu after selecting a class.
+// Default: "1"
+zr_classes_menu_autoclose "1"
+
// Player is assigned a random class every spawn. [Override: zr_classes_default_*]
// Default: "0"
zr_classes_random "0"
@@ -204,12 +208,6 @@ zr_classes_human_select "1"
// Default: "1"
zr_classes_admin_select "1"
-// Menu
-
-// Automatically close class selection menu.
-// Default: "0"
-zr_classes_menu_autoclose "0"
-
// Overlay
// Allow players to toggle class overlay.
@@ -221,8 +219,8 @@ zr_classes_overlay_toggle "1"
zr_classes_overlay_togglecmds "nightvision"
// Default class overlay toggle state set on connecting player.
-// Default: "0"
-zr_classes_overlay_default "0"
+// Default: "1"
+zr_classes_overlay_default "1"
// ----------------------------------------------------------------------------
diff --git a/docs/zr_manual.htm b/docs/zr_manual.htm
index 12d9750..3c2bc5b 100644
--- a/docs/zr_manual.htm
+++ b/docs/zr_manual.htm
@@ -16,7 +16,7 @@
-
+
Index
@@ -4384,7 +4384,7 @@ back to a default action.
models |
fatal |
- Missing models file: <file> |
+ Missing model list: <file> |
@@ -4395,37 +4395,119 @@ back to a default action.
|
models |
- error |
- Error opening model path directory: <directory> |
+ fatal |
+ Can't find any models in<file> |
- Description: The model path doesn't exist. Check for typos. Path
- is relative to the cstrike folder.
+ Description: The model file is empty or corrupt. Check for missing
+ quotes, etc.
+ |
+
+
+
+ models |
+ warning |
+ Warning: Maximum number of models reached (<max models>).
+ Skipping other models. |
+
+
+
+ Description: There's too many models in the model list, and the
+ rest of the list is ignored.
+ |
+
+
+
+ models |
+ warning |
+ Warning: Invalid model name/path setting at index <index>.
+ File not found: <model file>. |
+
+
+
+ Description: The specified model file could not be found, verify
+ path and name attributes. Path must end with "/".
+ |
+
+
+
+ models |
+ warning |
+ Warning: Invalid model team setting at index <index>:
+ <attribute value>. |
+
+
+
+ Description: Model team attribute failed validation.
+ Check for typos and that it has a valid value.
+ |
+
+
+
+ models |
+ warning |
+ Warning: Invalid model access setting at index <index>:
+ <attribute value>. |
+
+
+
+ Description: Model access attribute failed validation.
+ Check for typos and that it has a valid value.
+ |
+
+
+
+ models |
+ warning |
+ Warning: Invalid model group setting at index <index>.
+ Couldn't find SourceMod group <group name>. |
+
+
+
+ Description: The specified group name does not exist in the
+ SourceMod group list.
|
models |
error |
- Missing model files on server (<file>) |
+ Error opening directory: <directory> |
- Description: The model file doesn't exist. Check for typos. Path
- is relative to the cstrike folder.
+ Description: Couldn't open the directory specified in
+ path attribute. Verify that the game server has read access, and access to
+ list files in that directory.
+ |
+
+
+
+ models |
+ error |
+ Couldn't find any model files for <model name>. Check
+ name and path . |
+
+
+
+ Description: Files starting with the model name could not be found
+ in the specified path. Verify that the name attribute only contains the
+ model name, and not the path.
|
models |
fatal |
- No usable (public) model paths in <file> |
+ Missing public model in <model list file>. There must be at
+ least one public model. |
- Description: There's no public models to be assigned zombies and humans.
- Cause: Typos or invalid paths in model list.
+ Description: There's no public models to be assigned either/both
+ zombies and humans. Verify that access attribute is "public" on at least
+ one model per team.
|
diff --git a/src/zr/cvars.inc b/src/zr/cvars.inc
index cd5c7da..a3cb292 100644
--- a/src/zr/cvars.inc
+++ b/src/zr/cvars.inc
@@ -271,12 +271,12 @@ CvarsCreate()
g_hCvarsList[CVAR_CLASSES_ADMIN_SELECT] = CreateConVar("zr_classes_admin_select", "1", "Allow admins to select admin mode classes. (Not to be confused by admin-only classes!)");
// Menu
- g_hCvarsList[CVAR_CLASSES_MENU_AUTOCLOSE] = CreateConVar("zr_classes_menu_autoclose", "0", "Automatically close class selection menu after selecting a class.");
+ g_hCvarsList[CVAR_CLASSES_MENU_AUTOCLOSE] = CreateConVar("zr_classes_menu_autoclose", "1", "Automatically close class selection menu after selecting a class.");
// Overlays
g_hCvarsList[CVAR_CLASSES_OVERLAY_TOGGLE] = CreateConVar("zr_classes_overlay_toggle", "1", "Allow players to toggle class overlay.");
g_hCvarsList[CVAR_CLASSES_OVERLAY_TOGGLECMDS] = CreateConVar("zr_classes_overlay_togglecmds", "nightvision", "List of commands to hook that players can use to toggle class overlay. [Dependency: zr_classes_overlay_toggle | Delimiter: \", \"]");
- g_hCvarsList[CVAR_CLASSES_OVERLAY_DEFAULT] = CreateConVar("zr_classes_overlay_default", "0", "Default class overlay toggle state set on connecting player.");
+ g_hCvarsList[CVAR_CLASSES_OVERLAY_DEFAULT] = CreateConVar("zr_classes_overlay_default", "1", "Default class overlay toggle state set on connecting player.");
// ===========================
diff --git a/src/zr/models.inc b/src/zr/models.inc
index d5ea349..5bfa7ff 100644
--- a/src/zr/models.inc
+++ b/src/zr/models.inc
@@ -90,6 +90,7 @@ ModelsLoad()
ModelCount = 0;
new failedCount;
new publicCount;
+ new downloadCount;
// Loop through all models and store attributes in ModelData array.
do
@@ -148,7 +149,7 @@ ModelsLoad()
}
else
{
- // Increment public model counter.
+ // Increment public model counter for the current team.
if (ModelData[ModelCount][Model_Access] == ModelAccess_Public)
{
publicCount++;
@@ -174,6 +175,9 @@ ModelsLoad()
continue;
}
+ // Reset file counter for the current model.
+ downloadCount = 0;
+
new FileType:type;
decl String:file[64];
decl String:fileShort[64];
@@ -206,11 +210,23 @@ ModelsLoad()
// Precache model file and add to downloads table.
PrecacheModel(buffer, true);
AddFileToDownloadsTable(buffer);
+
+ // Increment file counter for the current model.
+ downloadCount++;
}
CloseHandle(dir);
- ModelCount++;
+ // Check if no model files were found.
+ if (!downloadCount)
+ {
+ LogEvent(false, LogType_Error, LOG_CORE_EVENTS, LogModule_Models, "Config Validation", "Couldn't find any model files for \"%s\". Check name and path.", name);
+ }
+ else
+ {
+ // Increment model counter.
+ ModelCount++;
+ }
} while (KvGotoNextKey(kvModels));
CloseHandle(kvModels);
@@ -218,7 +234,7 @@ ModelsLoad()
// Check if there are no public models.
if (!publicCount)
{
- LogEvent(false, LogType_Fatal, LOG_CORE_EVENTS, LogModule_Models, "Config Validation", "Couldn't find any public model in \"%s\". There must be at least one public model.", modelPath);
+ LogEvent(false, LogType_Fatal, LOG_CORE_EVENTS, LogModule_Models, "Config Validation", "Missing public model in \"%s\". There must be at least one public model.", modelPath);
}
// Log model validation info.
diff --git a/src/zr/playerclasses/filtertools.inc b/src/zr/playerclasses/filtertools.inc
index b42eb55..c2e7144 100644
--- a/src/zr/playerclasses/filtertools.inc
+++ b/src/zr/playerclasses/filtertools.inc
@@ -169,7 +169,7 @@ stock ClassValidateAttributes(classindex)
!StrEqual(model_path, "random_admins", false) &&
!StrEqual(model_path, "random_mother_zombies", false) &&
!StrEqual(model_path, "default", false) &&
- !StrEqual(model_path, "nochange", false))
+ !StrEqual(model_path, "no_change", false))
{
// Check if the file exists.
if (!FileExists(model_path))