AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Sniper control v1.2 (https://forums.alliedmods.net/showthread.php?t=867)

willyumyum 04-05-2004 02:53

Sniper control v1.2
 
1 Attachment(s)
Sniper Control 1.2
This plugin is slightly different from other 'sniper control' plugins that may be out there... Simply put, plugins that force you to auto drop the sniper rifle if the set limit has been reached are exploitable, and you can easily get around them...

So, I've developed this plugin that does not let you even pick up the sniper rifle if the limit has been reached.

All sniper rifles are included in the 'checking'
a special #define is in the code for including or excluding the scout from the count, but the AWP and auto snipers are included...

This plugin requires the engine module to be in use on your server...

Test it out, it's still in beta stages so PLEASE report any bugs to this thread... ( sorry if the code is slightly messy, i havn't had time to clean it up )

There is a config file needed ( or, rather, recommended for this plugin ):
it goes in 'addons/amxx/configs/' and is called 'sniper_control.cfg'
cvars to use in this version ( 1.1 ):
  • mp_sniper_control // 1 = on, 0 = off
    sc_max_snipers_t // number of sniper rifles for the T team
    sc_max_snipers_ct // number of sniper rifles for the CT team

There is also an optional disabled maps file
If you choose to use this file simply create a file called 'sc_disabled_maps.cfg' in '/addons/amxx/configs/' and list maps in which you would like the plugin to be disabled.

* NOTE: if you DO use 'sc_disabled_maps.cfg' then you must add mp_sniper_control 1 to your 'sniper_control.cfg' file in order for it to re-enable the plugin on non-disabled maps.

Enjoy, and remember to PLEASE report bugs to this thread.. Thank you :)

/ - Changelog -------------------------------------- */
v1.0
Initial public release
v1.1
added per-map disabled via 'sc_disabled_maps.cfg'
de-hardcoded config file paths from plugin
v1.2
fixed issue with scouts being blocked with INCLUDE_SCOUTS 0

BigBaller 04-05-2004 02:59

Nice

P.S

Do you plan on releasing your grenade control plugin, that was really usefully for smoke nade spammers :)

willyumyum 04-05-2004 03:00

Yeah, I'll work on converting that over to amxX and post it up, as well :)

~will

Pomme 04-05-2004 18:38

wow I just requested this plugin and right after I browse here and find it :D

Is it just for the awp or all sniper rifles? I'll read the sma but updating the plugin definition would be nice too as most ppl could assume awp only even if it says sniper rifle :)

EDIT: ok it's all sniper rifle :D ..including scout! :shock: haha very good work I test it on my 24 slots pub and report back ASAP. Can i simply strip down
Code:

"models/w_scout.mdl",              // CSW_SCOUT
on line 35 if I dont want to include the scout in the sniper limit?

EDIT 2 : OMG dude this plugin totally rocks there's a define to include the Scout or not! forgive me I was just so exited to find such a plugin I didn't read the whole sma :oops:

Pomme 04-05-2004 23:19

I played for a 2-3 hours tonight and didnt noticed any glitch, seems to be working very well :D

I gave it a 5/5 usefull!

[BioMaN]**neogun** 04-06-2004 09:05

possible to add on the 'sniper_control.cfg' or other files the possibility to disable this plugs for map awp_ or other map who use only sniper rifles ?

willyumyum 04-06-2004 09:25

yes, that's a possiblity - or there is a plugin ( i don't know if it's been swotched over to amxX yet ) that lets you use per-map configs ... I'll look into adding support to disable for maps within a config file..

~will

[BioMaN]**neogun** 04-06-2004 09:35

yes i find this plug for map cfg ...

but if your plug can recognize awp_(map) or scout_(map) or in general all maps who dont begin by cs_ de_ as_ etc ... this can be very usefull :wink:

willyumyum 04-06-2004 10:32

Plugin updated
per-map stopping of the plugin is now possible:)

knekter 04-06-2004 10:47

nice
 
nice, now when I play awp_map I dont have to go through the hassle of changing everything!

[BioMaN]**neogun** 04-06-2004 10:48

thx i add this plug on my GS :wink:

it snt possible to check the beginning of a name map for find cs_ de_ as_ and also enable autamicaly the plugin only for this map ?

more usefull no ?

willyumyum 04-06-2004 11:02

Quote:

Originally Posted by [BioMaN
**neogun**]thx i add this plug on my GS :wink:

it snt possible to check the beginning of a name map for find cs_ de_ as_ and also enable autamicaly the plugin only for this map ?

more usefull no ?

Sure, it's possible - but with the config you have more control as a server admin.

knekter 04-06-2004 11:04

you get alot more control, but the de_ cs_ as_ thing, could be a nice idea also :)

[BioMaN]**neogun** 04-06-2004 11:19

yep, you just have to add the prefix name map on a cfg fil so ...

I have more than 100 maps ... it s more usefull for me if i have just to add cs_ and de_ or as_ in a file :wink:

in more if you forget to add you map awp actually ... => crash :lol:

Pomme 04-06-2004 11:31

well just copy and paste all the maps you got by doing a "dir *.bsp /b >sc_disabled_maps.cfg'" in your maps directory and delete those where you need the plugin to run plus the .bsp extension ...that isnt too much assle in my opinion and more flexible.

although automatic disabling on awp_ maps would be nice.

[BioMaN]**neogun** 04-06-2004 11:44

why not include the two ideas ?

Add cvar for chose if we use listofmapsforbiden.cfg or prefixmapenableplug.cfg ...

willyumyum 04-06-2004 12:25

For the next release I can modify it so it will check on partial and full mapnames in the .cfg file....

willyumyum 04-06-2004 13:25

small update: removed hardcoding of config file paths ...

Pomme 04-07-2004 12:27

has anything changed since you added the per-map config in the sniper control part of the code?

I dont want to update to the per-map version of your plugin because I already uses map_configs by JustinHoMi (available for AMXX).

...and just to be frank, I dont see any need to complexify your plugin with the per-map config as most ppl will already run JustinHoMi plugin to remove freezetime and other cvars on awp map (and other custom "fun" maps) and all that is needed to comply with your plugin is to put the already available cvars in your first release. My two cents :wink: :)

Now the real question for you, I used the
Code:

#define INCLUDE_SCOUT            0
on my compile but just yesterday a player complained he couldn't buy a scout because of team limit... now I just commented
Code:

register_clcmd("scout",    "menuSniper");
on line 309 is that correct? Will that fix this possible problem?

willyumyum 04-07-2004 13:08

the per map config thing is just for people looking to use one plugin - i use justinhomi's plugin too, but if people don't want to then using the one in here will help them out..

ah crap, that was a small error in the code on my behalf - if you grab the new version if you have INCLUDE_SCOUT 0 then it should work properly... Ther reason it wasn't working was because i still had it checking for scouts on vgui menus because i forgot to put it inside my precompiler if statement:) Sorry about that :([/code]

willyumyum 04-08-2004 12:52

sorry if you downloaded this for the scout fix yesterday (april 7 ) i did something screwey when i was updating the thread and nothing new got uploaded....

So, the REAL fix is posted now - again, sorry about that..

Pomme 04-09-2004 10:50

NP :)

I have a question, on fy_iceworld if I put sc_max_snipers_t 0 and
sc_max_snipers_ct 0 in my custom map config (JGHG), will that make it impossible for people to use the awp as I would expect?

willyumyum 04-09-2004 17:44

it will still allow the players to pick up the snipers, because i havn't coded that support into this yet - that would require checking for a different entity type ( armoury_entity )....

I'm going to code that in, as well as a limit per type of sniper rifle + the overall limit... it'll offer a bit more control over stuff :)

[BioMaN]**neogun** 04-10-2004 05:38

possible to add shield restriction with snipe restriction ?

both needs restrictions :wink:

willyumyum 04-10-2004 18:00

my friend ryan did up a shield restriction plugin for amx ( not amxX ) I'll see if i can get him to port it over :)

illegal-op 04-13-2004 21:59

Quote:

Originally Posted by willyumyum
I'm going to code that in, as well as a limit per type of sniper rifle + the overall limit... it'll offer a bit more control over stuff :)

When do you think this update will be ready? Also, the shield limit plugin.. I've been waiting a long time for these 2 as you describe them here.

willyumyum 04-14-2004 00:32

I was going to start work on that tonight, actually - I've been pretty busy with classwork - 300+ page group reports suck $#1T!!!!!!!!!!!!!!!!!!!!!!!!!!

But yeah, I'll start work/testing on it tonight - and maybe, it'll be quick n' easy and up/out by tomorrow ( april 15 , 2004 )

illegal-op 04-15-2004 11:38

Thanks Will..

Also, don't forget to talking to your friend Ryan to port over the shield plugin :wink:

illegal-op 04-15-2004 16:49

I keep getting this error and then the server crashes

L 04/15/2004 - 14:46:59: [AMXX] Run time error 4 on line 142 (plugin "sniper_control.amx")

Peli 04-15-2004 20:11

Good job , I myself am not a fan of the Awp.

willyumyum 04-16-2004 01:06

Quote:

Originally Posted by illegal-op
I keep getting this error and then the server crashes

L 04/15/2004 - 14:46:59: [AMXX] Run time error 4 on line 142 (plugin "sniper_control.amx")

hmm, ok - I'll look into that right now...

~will

willyumyum 04-16-2004 01:12

I believe runtime error 4 is an array index out of bounds error, and I think my problem there was not taking into accoutn all the weapon id's possible in CS? Not sure, anyway - i increased the array size... this *should* fix the issue, but im still looking into any other possible causes...

bugfix uploaded - no new version number, still working on per-sniper blocking :)

willyumyum 04-16-2004 01:23

Ok, I spoke with BAILOPAN and he told me that there's an issue with get user weapons, but he also told me about a workaround - that was the problem. it shold be fixed now :)

illegal-op 04-18-2004 18:58

Thanks, I'll try again

illegal-op 04-19-2004 20:56

Tried to compile the plugin and got the following

Code:

sniper_control.sma(107) : error 047: array sizes must match
sniper_control.sma(140) : error 047: array sizes must match


willyumyum 04-20-2004 15:58

really sorry about that, I had changed the array sizes trying to fix it ( before i spoke with BAILO ) and i forgot to change them back ... should be good now... really sorry about that

illegal-op 04-20-2004 16:19

No need to be sorry.. mistakes happen. I appreciate you making the plugin and as soon as I get the shield plugin, I'll be set :)

illegal-op 07-16-2004 02:37

Are you going to enable checking to see if the max sniper weapons are already in hand at round start that it will disable the team from buying additional sniper rifles instead if making them waste money just to throw the weapon away.

jay7 11-07-2004 23:22

can someone fix download for .20 version? thanks.

jay7 11-18-2004 15:03

plz upgrade for latest amxmodx


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

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