AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Winning Team Restriction (https://forums.alliedmods.net/showthread.php?t=62012)

red! 10-16-2007 16:03

Winning Team Restriction
 
3 Attachment(s)
This plugin calls a configurable command to restrict items for the winning team. Restrictions can be done using any restriction-utility that allows team-based restriction (e.g. ^bugs^ sm_restrict).
New feature: win streak override, if the team losing by absolute number of points wins a certain amount of rounds, the restriction may be overridden with restrict all or complete unrestrict.

For those who need it clear: ITS NOT A STANDALONE PLUGIN, IT NEEDS ANOTHER PLUGIN TO WORK. (I do not appreciate do do the same work twice)

commands:

sm_wtrestrict_status, show restrictions status

cvars:

sm_wt_restrict_enable 1/0, enable/disable plugin
sm_wt_offset <int>, offset of score that one team may have more than the other before restriction becomes active
sm_restrict_cmd_unrestrict_all "<cmd>", command that resets all restrictions to off. called each mapchange to get a defined state of restriction
sm_restrict_cmd_t "<cmd>", command to activate restrictions on terrorist team
sm_restrict_cmd_ct "<cmd>", command to activate restrictions on counter-terrorist team
sm_unrestrict_cmd_t "<cmd>", command to disable restrictions on terrorist team
sm_unrestrict_cmd_ct "<cmd>", command to disable restrictions on terrorist team
sm_winstreak_length <wins>, number of subsequent round the loosing team has to win to enable win stream override (default "2"), set to 0 to disable this feature
sm_winstreak_mode 0/1, what shall be done if loosing team has a win streak (0=unrestrict, 1=restrict for both teams, default "1")

version history:

1.0.3 beta: first public release
1.0.4 fixed bug on disabling and reenabling the plugin during one map, added sm_wt_offset
1.2.5 some code cleanups, added win streak handling

red! 10-16-2007 16:06

Re: Winning Team Restriction
 
Additionally I can provide you my sample config based on ^bugs^ sm_restrict (possibly instead of a real documentation :mrgreen:):


Code:

sm_wt_restrict_enable 1
sm_wt_offset 1
sm_restrict_cmd_unrestrict_all "sm_unrestrict all"
sm_restrict_cmd_t "sm_restrict item team t awp g3sg1 sg550 dummy"
sm_restrict_cmd_ct "sm_restrict item team ct awp g3sg1 sg550 dummy"
sm_unrestrict_cmd_t "sm_unrestrict item team t awp g3sg1 sg550"
sm_unrestrict_cmd_ct "sm_unrestrict item team ct awp g3sg1 sg550"

and here the alternative config for Liams restrict plugin:

Code:

sm_wt_restrict_enable 1
sm_wt_offset 1
sm_restrict_cmd_unrestrict_all "sm_unrestrict awp all;sm_unrestrict sg550 all; sm_unrestrict g3sg1 all"
sm_restrict_cmd_t "sm_restrict awp 0 t;sm_restrict sg550 0 t; sm_restrict g3sg1 0 t"
sm_restrict_cmd_ct "sm_restrict awp 0 ct;sm_restrict sg550 0 ct; sm_restrict g3sg1 0 ct"
sm_unrestrict_cmd_t "sm_unrestrict awp t;sm_unrestrict sg550 t; sm_unrestrict g3sg1 t"
sm_unrestrict_cmd_ct "sm_unrestrict awp ct;sm_unrestrict sg550 ct; sm_unrestrict g3sg1 ct"


^BuGs^ 10-23-2007 13:24

Re: Winning Team Restriction
 
red, when I get back from vacation, I will help you work with the API on this. Good idea. :) Kinda like my KDR plugin.

red! 10-23-2007 18:20

Re: Winning Team Restriction
 
nice idea. at the moment I suffer from a lack of spare time, to write plugins, administrate a CS:S server and do my day-time job.

maybe the most time-consuming job of porting my CS:S-Server to sourcemod is done now, and we'll see what we can do after you vacation. have a nice trip.

ferret 11-05-2007 09:47

Re: Winning Team Restriction
 
Please edit your plugin and put the id # for Bug's weapon restriction in the "Dependancies" field

red! 11-06-2007 12:31

Re: Winning Team Restriction
 
Quote:

Originally Posted by ferret (Post 549740)
Please edit your plugin and put the id # for Bug's weapon restriction in the "Dependancies" field

I would not treat bugs plugin as a hard dependency. This plugin is able to trigger any action on winning/losing team.
In my opinion Bugs plugin is a bit too heavy-weight for this purpose. I use it due to missing alternatives. And even worse bugs plugin very often causes crashed due to some index errors (http://bugs.alliedmods.net/index.php...s&task_id=1094) making the whole admin-system unavailable.

andrey (Russia) 11-12-2007 09:35

Re: Winning Team Restriction
 
Very-very cool

Noobtastic 11-22-2007 00:20

Re: Winning Team Restriction
 
Just a quick question, do the restrictions get deactivated again after the losing team has made up the difference? For instance, CT is leading with 7-2, I'll have my offset at 5, so the restrictions become active. If the T team levels the score or even just brings it back to 7-3, will the restrictions get deactivated?

red! 11-22-2007 08:26

Re: Winning Team Restriction
 
Quote:

Originally Posted by Noobtastic (Post 555551)
Just a quick question, do the restrictions get deactivated again after the losing team has made up the difference? For instance, CT is leading with 7-2, I'll have my offset at 5, so the restrictions become active. If the T team levels the score or even just brings it back to 7-3, will the restrictions get deactivated?

yes, thats the reason why you have to configure

sm_unrestrict_cmd_t "..."
sm_unrestrict_cmd_ct "..."

if teams scores get back in balance both teams get unrestricted.

Noobtastic 11-22-2007 10:59

Re: Winning Team Restriction
 
Ah yes, of course, thanks, I'll try this plugin on one of my servers :).


All times are GMT -4. The time now is 09:06.

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