View Single Post
ryxzxz
Junior Member
Join Date: Feb 2016
Old 07-15-2021 , 23:32   Re: [L4D2] Shop [v2.7 | 23 May 2021]
Reply With Quote #30

Hello,I found some issue.
Quote:
char g_sInfectedItems[][] =
{ // Infected Items ID:
"kill", // 0
"health", // 1
"boomer", // 2
"hunter", // 3
"smoker", // 4
"spitter", // 5
"charger", // 7 should be 6
"jockey", // 8 should be 7
"tank", // 9 should be 8
"witch", // 10 should be 9
"mob", // 11 should be 10
"director_force_panic_event", // 12 should be 11
};
This will cause points_limit_tanks and points_limit_witches work incorrect.

Quote:
if(id == 9) //tank should be 8
{
if (g_iNoOfTanks + 1 < GetConVarInt(cvar_tank_limit) + 1)
{
g_iNoOfTanks++;
}
else
{
CPrintToChat(client,"%T%T", "SYSTEM", client, "UP_TO_LIMIT", client, item);
return;
}
}
else if(id == 10) // witch should be 9
{
if (g_iNoOfWitches + 1 < GetConVarInt(cvar_witch_limit) + 1)
{
g_iNoOfWitches++;
}
else
{
CPrintToChat(client,"%T%T", "SYSTEM", client, "UP_TO_LIMIT", client, item);
return;
}
}
Finally, g_iNoOfTanks and g_iNoOfWitches should be reset when RoundStart or RoundEnd.
ryxzxz is offline