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

Solved [TF2] Force team to win


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
infinixius
New Member
Join Date: Jun 2021
Old 06-05-2021 , 11:44   [TF2] Force team to win
Reply With Quote #1

hey!

is it possible to force a specific team to win with sourcemod? the console command mp_forcewin seems to be client-side and requires sv_cheats.

thanks!

Last edited by infinixius; 06-05-2021 at 12:21.
infinixius is offline
StrikeR14
AlliedModders Donor
Join Date: Apr 2016
Location: Behind my PC
Old 06-05-2021 , 12:13   Re: [TF2] Force team to win
Reply With Quote #2

PHP Code:
stock void ForceTeamWin(int team)
{
    
int ent CreateEntityByName("game_round_win");
    
DispatchKeyValue(ent"force_map_reset""1");
    
DispatchSpawn(ent);
    
    if (
ent == -1)
    {
        
LogError("[SZF] Can't create 'game_round_win', can't end round!");
    }
    else
    {
        
SetVariantInt(team);
        
AcceptEntityInput(ent"SetTeam");
        
AcceptEntityInput(ent"RoundWin");
    }

__________________
Currently taking TF2/CSGO paid private requests!

My Plugins | My Discord Account
StrikeR14 is offline
Reply


Thread Tools
Display Modes

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 08:27.


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