Made cvar for displaying class menu on first spawn. Renamed class menu cvars.
This commit is contained in:
@ -75,6 +75,9 @@ ClassClientInit(client)
|
||||
// Forward event to sub-modules.
|
||||
ClassOverlayClientInit(client);
|
||||
}
|
||||
|
||||
// Reset spawn flag.
|
||||
ClassPlayerSpawned[client] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -176,10 +179,12 @@ ClassOnClientSpawn(client)
|
||||
TranslationPrintToChat(client, "Classes random assignment", classname);
|
||||
}
|
||||
|
||||
// Display class menu if enabled.
|
||||
new bool:classmenu = GetConVarBool(g_hCvarsList[CVAR_CLASSES_SPAWN]);
|
||||
if (classmenu)
|
||||
// Display class menu if either menu cvar is set.
|
||||
new bool:menuspawn = GetConVarBool(g_hCvarsList[CVAR_CLASSES_MENU_SPAWN]);
|
||||
new bool:menujoin = GetConVarBool(g_hCvarsList[CVAR_CLASSES_MENU_JOIN]);
|
||||
if (menuspawn || (menujoin && !ClassPlayerSpawned[client]))
|
||||
{
|
||||
ClassPlayerSpawned[client] = true;
|
||||
ClassMenuMain(client);
|
||||
}
|
||||
}
|
||||
|
@ -458,6 +458,11 @@ new bool:ClassAllowInstantChange[MAXPLAYERS + 1];
|
||||
*/
|
||||
new String:ClassOriginalPlayerModel[MAXPLAYERS + 1][PLATFORM_MAX_PATH];
|
||||
|
||||
/**
|
||||
* Specifies whether a player has spawned.
|
||||
*/
|
||||
new bool:ClassPlayerSpawned[MAXPLAYERS + 1];
|
||||
|
||||
#include "zr/playerclasses/filtertools"
|
||||
#include "zr/playerclasses/attributes"
|
||||
#include "zr/playerclasses/apply"
|
||||
|
Reference in New Issue
Block a user