Raised This Month: $168 Target: $400
 42% 

Winning Team Restriction


Post New Thread Reply   
 
Thread Tools Display Modes
Author
red!
Senior Member
Join Date: Sep 2007
Location: Germany
Plugin ID:
198
Plugin Version:
1.2.5
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Restrict Weapons/Equipment for the winning team (needs low-level plugin with team-based restrictions)
    Old 10-16-2007 , 16:03   Winning Team Restriction
    Reply With Quote #1

    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
    Attached Files
    File Type: sp Get Plugin or Get Source (wt_restrict.sp - 616 views - 5.9 KB)

    Last edited by red!; 03-29-2012 at 17:49. Reason: plugin update
    red! is offline
    red!
    Senior Member
    Join Date: Sep 2007
    Location: Germany
    Old 10-16-2007 , 16:06   Re: Winning Team Restriction
    Reply With Quote #2

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


    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"

    Last edited by red!; 05-01-2008 at 02:11. Reason: config updated
    red! is offline
    ^BuGs^
    Senior Member
    Join Date: May 2007
    Old 10-23-2007 , 13:24   Re: Winning Team Restriction
    Reply With Quote #3

    red, when I get back from vacation, I will help you work with the API on this. Good idea. Kinda like my KDR plugin.
    __________________
    Sourcemod Plugin Author and Plugin Approver
    "The correct way is MAXPLAYERS + 1"
    I will not take bugs/new idea reports over the forums. Please use the issue list.
    ^BuGs^ is offline
    red!
    Senior Member
    Join Date: Sep 2007
    Location: Germany
    Old 10-23-2007 , 18:20   Re: Winning Team Restriction
    Reply With Quote #4

    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.
    red! is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 11-05-2007 , 09:47   Re: Winning Team Restriction
    Reply With Quote #5

    Please edit your plugin and put the id # for Bug's weapon restriction in the "Dependancies" field
    __________________
    I'm a blast from the past!

    -< www.gamehavoc.com >-
    ferret is offline
    red!
    Senior Member
    Join Date: Sep 2007
    Location: Germany
    Old 11-06-2007 , 12:31   Re: Winning Team Restriction
    Reply With Quote #6

    Quote:
    Originally Posted by ferret View Post
    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.

    Last edited by red!; 11-06-2007 at 12:35.
    red! is offline
    andrey (Russia)
    Junior Member
    Join Date: Aug 2007
    Old 11-12-2007 , 09:35   Re: Winning Team Restriction
    Reply With Quote #7

    Very-very cool
    __________________
    My russian sites.
    If you're from Russia click here:
    www.csz.ucoz.ru - sait about cs
    www.fast-shot.ucoz.ru - fast-shot clan site
    www.kinoshki.ucoz.ru - sait where you can download films
    www.tennis4ever.ucoz.ru - sait about tennis
    www.moga.ucoz.ru - sait about all what beautifull
    Very cool site
    andrey (Russia) is offline
    Noobtastic
    Member
    Join Date: Nov 2007
    Old 11-22-2007 , 00:20   Re: Winning Team Restriction
    Reply With Quote #8

    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?
    Noobtastic is offline
    red!
    Senior Member
    Join Date: Sep 2007
    Location: Germany
    Old 11-22-2007 , 08:26   Re: Winning Team Restriction
    Reply With Quote #9

    Quote:
    Originally Posted by Noobtastic View Post
    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.
    red! is offline
    Noobtastic
    Member
    Join Date: Nov 2007
    Old 11-22-2007 , 10:59   Re: Winning Team Restriction
    Reply With Quote #10

    Ah yes, of course, thanks, I'll try this plugin on one of my servers .
    Noobtastic 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 21:19.


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