now reading flags as well with aop indicating vip in the tier menu
This commit is contained in:
parent
81c0af7ebc
commit
261abb0aad
@ -22,6 +22,7 @@ int g_iPlayerTier[MAXPLAYERS + 1];
|
|||||||
int g_iPlayerNextTierHours[MAXPLAYERS + 1];
|
int g_iPlayerNextTierHours[MAXPLAYERS + 1];
|
||||||
|
|
||||||
char g_GroupNames[32][64];
|
char g_GroupNames[32][64];
|
||||||
|
char g_GroupFlags[32][32];
|
||||||
int g_GroupNameCount = 0;
|
int g_GroupNameCount = 0;
|
||||||
|
|
||||||
StringMap g_GroupOverrides; // group name -> comma-separated override list
|
StringMap g_GroupOverrides; // group name -> comma-separated override list
|
||||||
@ -105,6 +106,7 @@ public void LoadGroupOverrides()
|
|||||||
if (StrContains(sName, "tier", false) == 0)
|
if (StrContains(sName, "tier", false) == 0)
|
||||||
{
|
{
|
||||||
strcopy(g_GroupNames[g_GroupNameCount], 64, sName);
|
strcopy(g_GroupNames[g_GroupNameCount], 64, sName);
|
||||||
|
kv.GetString("flags", g_GroupFlags[g_GroupNameCount], 32, "");
|
||||||
g_GroupNameCount++;
|
g_GroupNameCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -843,6 +845,11 @@ public void PrintClientGroupOverrides(int client)
|
|||||||
Format(entry, sizeof(entry), "%s: items", g_GroupNames[i]);
|
Format(entry, sizeof(entry), "%s: items", g_GroupNames[i]);
|
||||||
menu.AddItem("-1", entry, ITEMDRAW_DISABLED);
|
menu.AddItem("-1", entry, ITEMDRAW_DISABLED);
|
||||||
}
|
}
|
||||||
|
if (g_GroupFlags[i][0] != '\0' && StrEqual(g_GroupFlags[i], "aop"))
|
||||||
|
{
|
||||||
|
Format(entry, sizeof(entry), "%s: VIP", g_GroupNames[i]);
|
||||||
|
menu.AddItem("-1", entry, ITEMDRAW_DISABLED);
|
||||||
|
}
|
||||||
if (g_GroupOverrides.GetString(g_GroupNames[i], overrides, sizeof(overrides)))
|
if (g_GroupOverrides.GetString(g_GroupNames[i], overrides, sizeof(overrides)))
|
||||||
{
|
{
|
||||||
Format(entry, sizeof(entry), "%s: %s", g_GroupNames[i], overrides);
|
Format(entry, sizeof(entry), "%s: %s", g_GroupNames[i], overrides);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user