AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08] (https://forums.alliedmods.net/showthread.php?t=72926)

MoggieX 06-18-2008 16:41

Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
 
1 Attachment(s)
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?

TFN|Nick 06-18-2008 17:10

Re: Reserved Spectators/Teams V1.0 [18 Jun 08]
 
Nice plugin, answers quite a few requests I think... +karma :D

Extreme_One 06-19-2008 07:44

Re: Reserved Spectators/Teams V1.0 [18 Jun 08]
 
looks awesome. I certainly hope you can add TF2 support.

MoggieX 06-19-2008 08:45

Re: Reserved Spectators/Teams V1.0 [18 Jun 08]
 
Quote:

Originally Posted by TFN|Nick (Post 640701)
Nice plugin, answers quite a few requests I think... +karma :D

Cheers buddy :)

Quote:

Originally Posted by Extreme_One (Post 640901)
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

MoggieX 06-20-2008 19:13

Re: Reserved Spectators/Teams V1.5 [18 Jun 08]
 
Quote:

Originally Posted by Extreme_One (Post 640901)
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

Extreme_One 06-22-2008 08:33

Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
 
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

DJ Tsunami 06-22-2008 13:39

Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
 
Wait what? You're still using SM 1.0.1 for TF2? I'd recommend you upgrade to 1.0.4.2270+.

Extreme_One 06-22-2008 14:02

Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
 
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. :|

MoggieX 06-22-2008 17:31

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

Originally Posted by Extreme_One (Post 642263)
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

gnumsploitz 06-24-2008 06:21

Re: Reserved Spectators/Teams (Inc TF2) V1.5 [21 Jun 08]
 
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.


All times are GMT -4. The time now is 10:50.

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