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

Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MoggieX
Veteran Member
Join Date: Aug 2007
Location: n00bville
Plugin ID:
430
Plugin Version:
1.5
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Restrict "team" access to root or reserved access members
    Old 06-18-2008 , 16:41   Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
    Reply With Quote #1

    Reserved Spectators/Teams

    What does it do?
    This plug-in by default restricts players access to the spectator option and only grants access a player to spectator if they are either a root admin or have the reserved flag.

    Also this now should work for the following mods:
    • Counter Strike Source
    • Day of Defeat Source
    • Half Life 2 Multiplayer
    • Insurgency Mod
    • Team Fortress 2
    If they are not root or do not have the reserved flag there are three things that could happen:

    If the player already had a team and try switching
    They get moved back to the team they came from

    If didn't have a team (just joined), then two there are two options:

    With sm_resteams_type set to 1 (default)
    The player will be moved to the team with the least amount of players

    With sm_resteams_type set to 2
    The player will be moved to the team that is losing

    In addition to the default method of restricting players, I added another two options which can be set via sm_resteams_team.

    By default it restricts the spectators (team 1), however if you were to set this to 2, then it would restrict the access to Terrorists and if set to 3, then it will restrict access to Counter Terrorists (or what ever the team name is in the mod you are using).

    Why?
    I want spectator access for myself, an army of "core admins" and our sponsors, but to disable it for the battalion of n00blets we have. This plugin will hopefully fulfil my and possibly your requirements, as it will be quite flexible by the time I've finished with it.

    I will be adding another mode to this plug-in so that it will let normal admins swap teams (a Team/Clan restriction), this is primarily for us to run "Fight Nights" on our main server, where its the n00b army AKA Team MX take on the regulars in some hardcore "n00b on n00b" action and I don't have to keep moving non members off the team and can concentrate on getting killed in style.

    CVars:
    sm_resteams_version - Doh!

    sm_resteams_enable - Default: 1 (enabled)
    Enables the restriction of team joining, spectators by default

    sm_resteams_team
    - Default: 1 (spectators)
    Team to Restrict - Spectators = 1 (default), Terrorists = 2, Counter Terrorist = 3

    sm_resteams_type
    - Default: 1 (player count)
    Spectators swapping by: 1 = Player Count(default), 2 = Team Score

    sm_resteams_sound
    - Def: buttons/weapon_cant_buy.wav
    Sound to play when player is denied access to a team

    Installation:
    Pop the compiled smx file into your <%MOD DIR%>/addons/sourcemod/plugins folder, change maps and enjoy.

    Important Note:
    You will need mp_allowspectators set to 1 in your server.cfg file.

    Suggestions:
    - DONE In V1.5: Will look at TF2 later and see if its possible
    - Will be adding a 'clan' mode, so that only clan members can swap teams (coming soon)

    Version History:
    V1.0 - First Release
    V1.5 - Lifted pRED*'s method of dealing with multiple mods and this plugin should now support most mods.

    Special Thanks To:
    pRED* - For my n00b questions at some silly time of the morning
    DJ Tsunami - rount_start eh?
    Attached Files
    File Type: sp Get Plugin or Get Source (reservedteams.sp - 2262 views - 12.6 KB)
    __________________

    Last edited by MoggieX; 06-21-2008 at 10:07.
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    TFN|Nick
    Senior Member
    Join Date: Sep 2007
    Old 06-18-2008 , 17:10   Re: Reserved Spectators/Teams V1.0 [18 Jun 08]
    Reply With Quote #2

    Nice plugin, answers quite a few requests I think... +karma
    TFN|Nick is offline
    Send a message via MSN to TFN|Nick
    Extreme_One
    Veteran Member
    Join Date: Nov 2006
    Old 06-19-2008 , 07:44   Re: Reserved Spectators/Teams V1.0 [18 Jun 08]
    Reply With Quote #3

    looks awesome. I certainly hope you can add TF2 support.
    __________________
    Extreme_One is offline
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 06-19-2008 , 08:45   Re: Reserved Spectators/Teams V1.0 [18 Jun 08]
    Reply With Quote #4

    Quote:
    Originally Posted by TFN|Nick View Post
    Nice plugin, answers quite a few requests I think... +karma
    Cheers buddy

    Quote:
    Originally Posted by Extreme_One View Post
    looks awesome. I certainly hope you can add TF2 support.
    I don't know if its even possible in TF2 as I haven't looked, for other sourcemods, the function to switch teams should just work (unlike CS which was a wild goose chase). I need to tie in some mod checking as pRED* has in his super commands.

    I will look at this after putting in the team restriction by a normal admin flag, for our "fight nights", as I'm sick to death of swapping players around.

    Matt
    __________________

    Last edited by MoggieX; 06-19-2008 at 08:55.
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 06-20-2008 , 19:13   Re: Reserved Spectators/Teams V1.5 [18 Jun 08]
    Reply With Quote #5

    Quote:
    Originally Posted by Extreme_One View Post
    looks awesome. I certainly hope you can add TF2 support.
    Added support for the following:
    • Counter Strike Source
    • Day of Defeat Source
    • Half Life 2 Multiplayer
    • Insurgency Mod
    • Team Fortress 2
    All thanks to 90% copy/paste from pRED*'s super commands

    Matt
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    Extreme_One
    Veteran Member
    Join Date: Nov 2006
    Old 06-22-2008 , 08:33   Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
    Reply With Quote #6

    Great work MoggieX. Thank you.

    Hmm strange I'm getting an error on my second server

    Code:
    [SM] Unable to load plugin "reservedteams.smx": Required extension "cstrike" file("games/game.cstrike.ext") not running
    It's working fine on my other server.

    Both TF2 servers with identical SM set ups : SourceMod v1.0.1.2164
    __________________

    Last edited by Extreme_One; 06-22-2008 at 09:56.
    Extreme_One is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 06-22-2008 , 13:39   Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
    Reply With Quote #7

    Wait what? You're still using SM 1.0.1 for TF2? I'd recommend you upgrade to 1.0.4.2270+.
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.
    DJ Tsunami is offline
    Extreme_One
    Veteran Member
    Join Date: Nov 2006
    Old 06-22-2008 , 14:02   Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
    Reply With Quote #8

    ok so I updated to 1.0.4-r2270 which displays as SourceMod Version: 1.0.3-svn and I'm still getting

    Code:
    <Failed> "Reserved Spectators" (1.5) by MoggieX
    Code:
     [SM] Unable to load plugin "reservedteams.smx": Required extension "cstrike" file("games/game.cstrike.ext") not running
    But I have this plugin running perfectly on my other TF2 server with a near identical setup.
    __________________
    Extreme_One is offline
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 06-22-2008 , 17:31   Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
    Reply With Quote #9

    Quote:
    Originally Posted by Extreme_One View Post
    ok so I updated to 1.0.4-r2270 which displays as SourceMod Version: 1.0.3-svn and I'm still getting

    Code:
    <Failed> "Reserved Spectators" (1.5) by MoggieX
    Code:
     [SM] Unable to load plugin "reservedteams.smx": Required extension "cstrike" file("games/game.cstrike.ext") not running
    But I have this plugin running perfectly on my other TF2 server with a near identical setup.
    Very odd

    Glad to hear its working (50% of the time) in the other mods, especially TF2.

    Matt
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    gnumsploitz
    Junior Member
    Join Date: Nov 2007
    Location: Albany, NY
    Old 06-24-2008 , 06:21   Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
    Reply With Quote #10

    I'm running into the same problem with TF2:

    Code:
    [SM] Unable to load plugin "reservedteams.smx": Required extension "cstrike" file("games/game.cstrike.ext") not running
    I've spent the last couple of hours trying to edit the .sp, to remove the dependency, without any success. I'm able to get it to compile, but I just end up breaking the plugin entirely (read: the PrintToChat shows up, and that's about it... none of the team switching and restrictions work properly after my modifications).

    Anyone having any luck with this? I would love to use this plugin on my TF2 server.

    Last edited by gnumsploitz; 06-24-2008 at 06:23.
    gnumsploitz is offline
    Send a message via ICQ to gnumsploitz Send a message via AIM to gnumsploitz Send a message via MSN to gnumsploitz Send a message via Yahoo to gnumsploitz
    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 07:45.


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