printing tier rewards when player reaches new tier

This commit is contained in:
jenz 2026-06-21 14:31:59 +02:00
parent 131668a53d
commit 8f4e205db0

View File

@ -487,7 +487,36 @@ public bool check_if_client_new_tier(int client) //called every 10 minutes to fi
}
if (tier > g_iPlayerTier[client])
{
PrintToChatAll("%N Leveled up to Tier: %i!", client, tier);
char new_rewards[512];
if (g_iRtvBoost_tier == g_iPlayerTier[client])
{
Format(new_rewards, sizeof(new_rewards), "%ix Mapvote/RTV/Nomination boost", g_iPlayerRTVCapacity);
PrintToChatAll("%N Leveled up to Tier %i and unlocked: %s", client, tier, new_rewards);
}
if (FindConVar("sm_spraymanager_tier_required").IntValue == g_iPlayerTier[client])
{
Format(new_rewards, sizeof(new_rewards), "Spray access");
PrintToChatAll("%N Leveled up to Tier %i and unlocked: %s", client, tier, new_rewards);
}
if (FindConVar("sm_entwatch_tier_requirement").IntValue == g_iPlayerTier[client])
{
Format(new_rewards, sizeof(new_rewards), "Item access");
PrintToChatAll("%N Leveled up to Tier %i and unlocked: %s", client, tier, new_rewards);
}
if (FindConVar("mce_multiple_nominations_tier").IntValue == g_iPlayerTier[client])
{
Format(new_rewards, sizeof(new_rewards), "Multiple nominations");
PrintToChatAll("%N Leveled up to Tier %i and unlocked: %s", client, tier, new_rewards);
}
if (g_GroupFlags[g_iPlayerTier[client]][0] != '\0' && StrEqual(g_GroupFlags[g_iPlayerTier[client]], "aop"))
{
Format(new_rewards, sizeof(new_rewards), "VIP");
PrintToChatAll("%N Leveled up to Tier %i and unlocked: %s", client, tier, new_rewards);
}
if (g_GroupOverrides.GetString(g_GroupNames[g_iPlayerTier[client]], new_rewards, sizeof(new_rewards)))
{
PrintToChatAll("%N Leveled up to Tier %i and unlocked: %s", client, tier, new_rewards);
}
upgrade_tier = true;
}