Raised This Month: $51 Target: $400
 12% 

[L4D2 Versus] How to apply custom damage scores in round?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 10-17-2022 , 19:10   [L4D2 Versus] How to apply custom damage scores in round?
Reply With Quote #1

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], _0true);
        
GameRules_SetProp("m_iChapterDamage"g_iRoundDamage[0], _1true);
    }

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.

Last edited by BRU7US; 10-17-2022 at 19:27.
BRU7US is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode