AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Plugins (https://forums.alliedmods.net/forumdisplay.php?f=76)
-   -   CS:S Sniper Control (https://forums.alliedmods.net/showthread.php?t=47453)

TommyV 11-18-2006 10:41

CS:S Sniper Control
 
I just thought I would share this in case anyone finds it useful. It's a simple CSS plugin I wrote for our server to try and keep sniper rifles under control, we didn't want to ban them completetly, but wanted to keep them in check.

Installation:
- Save SniperControl_mm.dll to cstrike/addons/snipercontrol/
- Add the line "addons/snipercontrol/SniperControl_mm" to metaplugins.ini

Features:
- Restricts sniper rifles (AWP, Autos and Scout) if a team is winning by so many rounds or has won so many in a row
- Drops weapons from players at round start when restrictions are put in place
- Prevents players from picking up restricted weapons
- Prevents players from buying restricted weapons (ignores restricted weapons in autobuy - rebuy will still allow players to buy restricted weapons, they will be dropped imediately but the player will have wasted their money)

Cvars:
sc_enable
Enables/Disables the plugin
1 = enabled (default)
0 = disabled

sc_wins
How many rounds a team must be winning by for restrictions to be enforced
Default = 3

sc_streaks
How many rounds in a row a team must win before restrictions are enforced
Default = 6

sc_awp
Whether or not the AWP is considered a sniper rifle
1 = Yes (default)
0 = No

sc_auto
Whether or not the auto snipers are considered sniper rifles
1 = Yes (default)
0 = No

sc_scout
Whether or not the scout is considered a sniper rifle
1 = Yes
0 = No (default)

sc_verbose
How often the plugin informs players about the restrictions
0 = Silent
1 = When restrictions are enforced/removed (default)
2 = at the start of every round


Windows binary download

Sorry to any Linux users who want to try this, but I don't have a Linux box to compile or test on. I have tried to keep the code compatible with Linux when using offsets and in the code I have copied from other plugins, so feel free to have a go at compilling it for Linux.

Source Code download

raaka-arska 11-19-2006 06:06

Re: CS:S Sniper Control
 
Good job! This is very close to being the "perfect" sniper control plugin.

I already have a feature request though: how about adding an option to restrict snipers to one or two per team by default?

tcviper 11-19-2006 07:42

Re: CS:S Sniper Control
 
Same as glittermod :)

raaka-arska 11-19-2006 12:59

Re: CS:S Sniper Control
 
Quote:

Originally Posted by tcviper (Post 404850)
Same as glittermod :)

Not exactly. In contrast to Glittermod that restricts single weapons, this plugin handles sniper rifles collectively, which makes a lot of sense. And it's a nice addition that you can configure which weapons are considered sniper rifles if you don't think that for example scout should be restricted.

So these default restrictions that I suggested would follow the same principle. If you buy a scout and only one sniper rifle is allowed per team, then that's it, assuming scout is considered a sniper rifle.

What do you think, TommyV?

tcviper 11-19-2006 17:39

Re: CS:S Sniper Control
 
uuh Glittermod does the same, you can actually set a maximum per team, limit them OR limit a specific weapon for the winning team.

raaka-arska 11-20-2006 01:35

Re: CS:S Sniper Control
 
Quote:

Originally Posted by tcviper (Post 405054)
uuh Glittermod does the same, you can actually set a maximum per team, limit them OR limit a specific weapon for the winning team.

OK, then I guess I'm either a bit lost or didn't express my thoughts clearly enough... :?

This is an extract from Glittermod configuration file:
Code:

// These are restrictions of count weapons per team
// Count of this weapon allowed per Team( -1=unlimited )
gmp_restrictteam_sg550 1
gmp_restrictteam_g3sg1 1
gmp_restrictteam_awp 1
gmp_restrictteam_scout 1
gmp_restrictteam_aug -1
...

From these configuration options I got the impression that the restrictions are applied for specific weapons only. If someone for example buys an sg550, someone else could still buy an awp, g3sg1 or a scout. I instead would like to restrict sniper rifles collectively: if sniper rifles are limited to one per team and you buy a scout, then no other member of the team could buy any type of sniper rifle any more as long as the scout is in the team's posession. I couldn't find a cvar to do the trick. Please enlighten me if I'm wrong.

TommyV 11-20-2006 09:28

Re: CS:S Sniper Control
 
It is similar to Glittermod, but I started it before Glittermod was available(I wouldn't have bothered if Glittermod was released then), just thought I'd share it in case anyone was interested.

It isn't exactly the same, as raaka says, it handles sinper rifles collectively, it is also a much simpler plugin than glittermod if you dont need the other features. I will look into adding your request raaka, I'll add a couple more cvars so you can decide how many snipers are allowed when restrictions are in place, and how many are allowed when they aren't.

raaka-arska 11-20-2006 10:17

Re: CS:S Sniper Control
 
Quote:

Originally Posted by TommyV (Post 405212)
I will look into adding your request raaka, I'll add a couple more cvars so you can decide how many snipers are allowed when restrictions are in place, and how many are allowed when they aren't.

Sounds very good. Thanks, Tommy! I'm looking forward to the next version. ;)

Too bad I'm running a Linux server, which means I either have to figure out how to compile your plugin on it or wait for someone else to do it...

TommyV 11-20-2006 14:18

Re: CS:S Sniper Control
 
I'll see if I can get someone to help me with a Linux compile as well, I need get up and running with Linux anyway.

tcviper 11-20-2006 16:46

Re: CS:S Sniper Control
 
Good though to see alternatives, keep up the great work mate!


All times are GMT -4. The time now is 01:40.

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