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

[CSGO] Stop round end from incrementing team score


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blaacky
Senior Member
Join Date: Oct 2012
Old 11-04-2022 , 09:30   [CSGO] Stop round end from incrementing team score
Reply With Quote #1

Hi, I am trying to figure out a way to stop the team scores from going up when a team wins a round. I have considered using CS_SetTeamScore at round end and decrementing their score by 1, and visually it would appear like the score never changed however it feels hacky to do that and I am wondering if anyone has a better solution. Is there possibly an up to date extension that I can use?
__________________
blaacky is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 11-04-2022 , 11:57   Re: [CSGO] Stop round end from incrementing team score
Reply With Quote #2

maybe this will help:
PHP Code:
#include <cstrike>

public Action CS_OnTerminateRound(floatdelayCSRoundEndReasonreason)
{
    if(
reason == CSRoundEnd_GameStart || reason == CSRoundEnd_Draw)
        return 
Plugin_Continue;

    
reason CSRoundEnd_Draw;
    return 
Plugin_Changed;

__________________
Grey83 is offline
blaacky
Senior Member
Join Date: Oct 2012
Old 11-04-2022 , 13:37   Re: [CSGO] Stop round end from incrementing team score
Reply With Quote #3

CS_OnTerminateRound is only called whenever the CS_TerminateRound function is called according to the docs. The rounds I am trying to make these changes to are ones that end without calling the CS_TerminateRound function

EDIT: Okay.. the docs lied or are a bit vague as to what they meant when they said TerminateRound
Code:
/**
 * Called when TerminateRound is called.
 * Return Plugin_Continue to ignore, return Plugin_Changed to continue,
 * using the given delay and reason, or return Plugin_Handled or a higher
 * action to block TerminateRound from firing.
 *
 * @param delay         Time (in seconds) until new round starts
 * @param reason        Reason for round end
 */
forward Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason);
__________________

Last edited by blaacky; 11-04-2022 at 13:50.
blaacky is offline
BeepIsla
Member
Join Date: Mar 2020
Location: Germany
Old 11-07-2022 , 06:10   Re: [CSGO] Stop round end from incrementing team score
Reply With Quote #4

CSGO has a function with the same name, the docs are most probably talking about that one, not the SourceMod function
BeepIsla 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 03:08.


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