Raised This Month: $ Target: $400
 0% 

Looking for TF2 Forced win plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rushy
AlliedModders Donor
Join Date: Jul 2015
Location: Melbourne, Australia
Old 09-21-2016 , 02:13   Looking for TF2 Forced win plugin
Reply With Quote #1

I am trying to look for a TF2 plugin that allows via a command to end the correct round as a win to the team you specify.

I have found this plugin:
https://forums.alliedmods.net/showthread.php?t=190798

However it crashes if you pass it 'red' or 'blue' on certain maps such as koth_suijin. (Passing 'none', works)

Would anyone be able to either code a plugin like this or fix the one mentioned above?
Rushy is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 09-21-2016 , 08:09   Re: Looking for TF2 Forced win plugin
Reply With Quote #2

mp_forcewin x where x is the team num.

Don't create and trigger the game_round_win entity (bad idea), which is what the plugin does. It crashes the server.

Alternatively, you can call CTFGameRules::SetWinningTeam and pass in the necessary parameters.

Last edited by Potato Uno; 09-21-2016 at 08:10.
Potato Uno is offline
Rushy
AlliedModders Donor
Join Date: Jul 2015
Location: Melbourne, Australia
Old 09-21-2016 , 11:20   Re: Looking for TF2 Forced win plugin
Reply With Quote #3

Quote:
Originally Posted by Potato Uno View Post
mp_forcewin x where x is the team num.

Don't create and trigger the game_round_win entity (bad idea), which is what the plugin does. It crashes the server.

Alternatively, you can call CTFGameRules::SetWinningTeam and pass in the necessary parameters.
Thanks.

I was looking at mp_forcewin, however it needs to have sv_cheats 1 set.

Are the plugins like this one:
Code:
https://forums.alliedmods.net/showthread.php?t=195037
Safe to use?
Rushy is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 09-21-2016 , 11:26   Re: Looking for TF2 Forced win plugin
Reply With Quote #4

Strip the cheats flag off of it to use w/o sv_cheats.
Potato Uno is offline
Rushy
AlliedModders Donor
Join Date: Jul 2015
Location: Melbourne, Australia
Old 09-21-2016 , 11:31   Re: Looking for TF2 Forced win plugin
Reply With Quote #5

Quote:
Originally Posted by Potato Uno View Post
Strip the cheats flag off of it to use w/o sv_cheats.
Is there a guide/wiki on how to strip cheat flags off a command?

*Edit found something that makes sense. Found on another page:

Code:
new flags = GetCommandFlags("thirdperson");
SetCommandFlags("thirdperson", flags & ~FCVAR_CHEAT);
where as instead of thirdperson, I place in mp_forcewin?

*Edit 2: That is easily implemented. Is it safe to leave the cheat flags off of the command? (I stripped it on plugin start up, ready to use it until I want to)

Last edited by Rushy; 09-21-2016 at 12:24.
Rushy is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 09-21-2016 , 16:11   Re: Looking for TF2 Forced win plugin
Reply With Quote #6

Firewall it with AddCommandListener and block it if anyone but client index 0 tries to run it. That should keep it safe.

(Unless if it happens to be a convar.)
Potato Uno is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-21-2016 , 17:22   Re: Looking for TF2 Forced win plugin
Reply With Quote #7

this is all wrong..
just send input to the tcpm entity.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 09-21-2016 , 18:35   Re: Looking for TF2 Forced win plugin
Reply With Quote #8

Quote:
Originally Posted by friagram View Post
this is all wrong..
just send input to the tcpm entity.
Because every map in the game has a control point master entity right...
Potato Uno is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-23-2016 , 21:50   Re: Looking for TF2 Forced win plugin
Reply With Quote #9

Quote:
Originally Posted by Potato Uno View Post
Because every map in the game has a control point master entity right...
https://sm.alliedmods.net/api/index....ad=show&id=45&
__________________
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 18:44.


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