Everyone who plays the "Versus" knows that if the team score are the same in both rounds, then the team is awarded a bonus of +25 points for the most damage done in the round.
I want to change that damage points to my values.
My way:
PHP Code:
public Action L4D2_OnEndVersusModeRound(bool countSurvivors)
{
if (InSecondHalfOfRound())
{
GameRules_SetProp("m_iChapterDamage", g_iRoundDamage[1], _, 0, true);
GameRules_SetProp("m_iChapterDamage", g_iRoundDamage[0], _, 1, true);
}
}
P.S. g_iRoundDamage - is my variable to store the damage in current round where:
g_iRoundDamage[
0] -
1st round on map;
g_iRoundDamage[
1] -
2nd round on map.
Sometimes it works right, but sometimes wrong. I want to know what means
0 and
1 in
GameRules_SetProp("m_iChapterDamage"...);
I used to think that this number corresponds to the number of the round on the map, however, after the tests, points were counted in cell
1 in the first round, and in the second round in cell
0. How does it work? I saw the
hybrid_scoremod plugin, where
0 is assigned to the cell first and only then
1. But it doesn't work that way for me.