Raised This Month: $32 Target: $400
 8% 

[TF2] Force Round Win Issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 01-23-2017 , 17:20   [TF2] Force Round Win Issue
Reply With Quote #1

So this is my stock I made:
Code:
stock void TF2_ForceRoundWin(TFTeam team = TFTeam_Unassigned)
{
	int iFlags = GetCommandFlags("mp_forcewin");
	SetCommandFlags("mp_forcewin", iFlags & ~FCVAR_CHEAT);
	ServerCommand("mp_forcewin %i", view_as<int>(team));
	SetCommandFlags("mp_forcewin", iFlags);
}
Before, it worked without problems and randomly, It stopped working with this in console on execution:
Code:
Can't use cheat command mp_forcewin in multiplayer, unless the server has sv_cheats set to 1.
Anybody have any ideas? Also, if anybody has a better method for this then please share since I would love to know.

Thanks Beautiful People.
Drixevel is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-24-2017 , 14:12   Re: [TF2] Force Round Win Issue
Reply With Quote #2

you can do it with the tcpm entity instead
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 01-24-2017 , 22:47   Re: [TF2] Force Round Win Issue
Reply With Quote #3

which VSH does if U NEED IT BRO
__________________

Last edited by Chdata; 01-24-2017 at 22:48.
Chdata is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 01-25-2017 , 09:05   Re: [TF2] Force Round Win Issue
Reply With Quote #4

Try this little stock
Code:
stock void ForceTeamWin(int team) {     int ent = FindEntityByClassname(-1, "team_control_point_master");     if (ent == -1)     {         ent = CreateEntityByName("team_control_point_master");         DispatchSpawn(ent);         AcceptEntityInput(ent, "Enable");     }         SetVariantInt(team);     AcceptEntityInput(ent, "SetWinner"); }
It does what you want.
__________________
Benoist3012 is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 01-26-2017 , 01:09   Re: [TF2] Force Round Win Issue
Reply With Quote #5

Works fine but it was crashing the developer server previously so not sure. I think it has something to do with the logic I had on the map at the time..
Drixevel is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-26-2017 , 15:29   Re: [TF2] Force Round Win Issue
Reply With Quote #6

if its multistage map u need to set the team to stalmate or search for the game win entity and do stalemate.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram 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 04:34.


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