AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Defuse/Team kill does not count as win (mp_winlimit) (https://forums.alliedmods.net/showthread.php?t=340509)

GoldNux 11-22-2022 17:39

Defuse/Team kill does not count as win (mp_winlimit)
 
I'm using a custom wincounter that increments every ct/t win sound event.
To have to change map when wincounter reaches the max winrounds I set, I bind it to "mp_winlimit":

In plugin_ini:
PHP Code:

set_cvar_num("mp_winlimit"get_cvar_num("gn_roundlimit")) 

This have been working for me, but today I noticed that mp_winlimit only counts bomb explotion.
If CT defuse or any team kill the other team the map doesent change even tho the winlimit have been exceeded.

I'm confused as mp_winlimit must surely be counting defuses etc.

EDIT: My solution right now is stupid but works:
PHP Code:

public checkScores()
{
    new 
printArguments[1];
    if (
g_RoundCounter != get_pcvar_num(g_pCvarRoundLimit))
    {
        
g_RoundCounter++;
        return;
    }
    if (
g_TeamOneScore == g_TeamTwoScore)
        
printArguments[0] = PRINT_DRAW;
    else if (
g_TeamOneScore g_TeamTwoScore)
        
printArguments[0] = PRINT_T1WINMATCH;
    else
        
printArguments[0] = PRINT_T2WINMATCH;
    
set_task(1.0"printMatchStats"12345printArgumentssizeof(printArguments)) 
    
set_cvar_num("mp_winlimit"1)




All times are GMT -4. The time now is 15:41.

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