AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Anti-Nade-Spam v2.3.6 (Updated: 8/20/12) (https://forums.alliedmods.net/showthread.php?t=107017)

thetwistedpanda 10-21-2009 15:01

[CS:S] Anti-Nade-Spam v2.3.6 (Updated: 8/20/12)
 
4 Attachment(s)
Dependencies:
  • SDKHooks v2.x, Sourcemod v1.4.x
Description:
  • Provides yet another method of preventing all grenades in Counter-Strike: Source from being spammed.
Features:

  • Each grenade type can be set to ignore or limited to x grenades per player, in addition to providing a simple blocking ability if desired.
  • Multiple methods of notifying players of why they're unable to use the desired grenade.
  • Ability to detect only grenades that are purchased in a buyzone or include all grenades a placer receives.
  • Support for Drifter's Weapon Restriction plugin allowing this plugin to play nicely.
ConVars:
  • css_anti_nade_spam_enable: Enables/disables all features of the plugin.
  • css_anti_nade_spam_messages: Determines printing functionality (-1 = Disabled, 0 = Chat, 1 = Hint, 2 = Center, 3 = Key Hint)
  • css_anti_nade_spam_buyzones: Determines incremental functionality. (0 = Count all grenades, 1 = Count only grenades inside of buyzone)
  • css_anti_nade_spam_hegrenade: The number of HE Grenades players are allowed to use. (-2 = Ignore, -1 = ammo_hegrenade_max, 0 = Disable HE Grenades)
  • sm_anti_nade_spam_smokegrenade: The number of Smoke Grenades players are allowed to use. (-2 = Ignore, -1 = ammo_smokegrenade_max, 0 = Disable Smokes)
  • css_anti_nade_spam_flashbang: The number of Flash Bangs players are allowed to use. (-2 = Ignore, -1 = ammo_flashbang_max, 0 = Disable Flashes)
Installation:
  • Place css_anti_nade_spam.smx inside of /sourcemod/plugins/
  • Place css_anti_nade_spam.phrases.txt of /sourcemod/translations/

Scup 10-21-2009 19:36

Re: [CS:S] Anti-Nade-Spam
 
Thank you so much for this, I've just got myself a CSS server and I'm using it for breakfloor but couldn't find something like this. Thanks again.

edit: Found a mistake.


Code:

"sm_ans_maxFB" = "2" ( def. "0" )
 - The number of Smoke Grenades players are allowed to use.

sm_ans_maxFB, this is flashbangs not smokes.


Code:

"sm_ans_maxSM" = "1"
 - The number of Flash Bangs players are allowed to use.

Again with this, they just need to be swapped.

Busterbadboy 11-01-2009 10:07

Flash bang issue
 
I'm having some issues with the flash bangs.

After every map start, I have to re-enter via console "sm_ans_maxFB 2". Otherwise I receive the in-game message "You are only allowed to buy 0 Flash Bang per round!"

I don't have any issues with HE grenades and smokes.

This is how I have it configured:
sm_ans_enable 1
sm_ans_method 1
sm_ans_maxHE 1
sm_ans_maxSM 1
sm_ans_maxFB 2

Any ideas what's wrong?

*BTW, this is an awesome plugin!

thetwistedpanda 11-01-2009 11:04

Re: [CS:S] Anti-Nade-Spam
 
Thanks for those two errors, I'll look into them today and get back to you.

*Edit: The first post has been updated with version 1.2. I was unable to find any logic issues that would only affect Flash Bangs, so I assume it's an issue in how I was saving the data set. I had an issue in another project where my enum set was corrupting, but as ANS was my first project I never updated it. It now uses a simple array and *should* fix the Flash Bang issue. *

Busterbadboy 11-01-2009 17:37

I still have the issue
 
Quote:

Originally Posted by thetwistedpanda (Post 977935)
Thanks for those two errors, I'll look into them today and get back to you.

*Edit: The first post has been updated with version 1.2. I was unable to find any logic issues that would only affect Flash Bangs, so I assume it's an issue in how I was saving the data set. I had an issue in another project where my enum set was corrupting, but as ANS was my first project I never updated it. It now uses a simple array and *should* fix the Flash Bang issue. *

I'm still having the same issue.

I receive both of these messages:
"You are not allowed to use any Flash Bangs!"
"You are only allowed to buy 0 Flash Bang per round!"

Can you code and post the source for the HE grenades and smokes?....These are the ones I need to prevent from being spammed, and it seems the plugin works well for those.

Thanks!

thetwistedpanda 11-01-2009 17:46

Re: [CS:S] Anti-Nade-Spam
 
I'm reworking a bit of the logic to prevent players from getting dual error messages, but I can see no issue that would present itself in that manner. Do you have any plugins running that may be attempting to give players a flashbang on their spawn?

*Edit: the original post has been updated with version 1.3 of anti-nade-spam. It features a convar sm_ans_messages to disable the error messages sent to players if they reach their maximum number of grenades. The logic for notifying players has also been reworked to prevent players from receiving dual error messages.*

Busterbadboy 11-01-2009 18:20

Re: [CS:S] Anti-Nade-Spam
 
Quote:

Originally Posted by thetwistedpanda (Post 978286)
I'm reworking a bit of the logic to prevent players from getting dual error messages, but I can see no issue that would present itself in that manner. Do you have any plugins running that may be attempting to give players a flashbang on their spawn?

*Edit: the original post has been updated with version 1.3 of anti-nade-spam. It features a convar sm_ans_messages to disable the error messages sent to players if they reach their maximum number of grenades. The logic for notifying players has also been reworked to prevent players from receiving dual error messages.*

I don't have a plugin running that gives players grenades of any kind, but I do want them to be able to buy 2 of them when they spawn. And I do want players to be able to pickup flashbangs during game play if they've already used the ones they bought at spawn.

The HE grenades and smokes work fine, when configured as such.

Thanks!

thetwistedpanda 11-01-2009 18:22

Re: [CS:S] Anti-Nade-Spam
 
Alright. This issue has intrigued me so I'm actually testing my code before releasing the next version. Check back in an hour and the issue should be fixed.

thetwistedpanda 11-01-2009 19:01

Re: [CS:S] Anti-Nade-Spam
 
Busterbadboy, please try the latest version. I apologize for all the issues you've had; I never took into consideration the fact that CS:S allows players to buy 2 Flash Bangs. I also changed the method for which it restricts grenades (if you get restricted in the buyzone, you can still pick up grenades elsewhere just not in another buyzone).

Busterbadboy 11-01-2009 21:00

Re: [CS:S] Anti-Nade-Spam
 
Quote:

Originally Posted by thetwistedpanda (Post 978367)
Busterbadboy, please try the latest version. I apologize for all the issues you've had; I never took into consideration the fact that CS:S allows players to buy 2 Flash Bangs. I also changed the method for which it restricts grenades (if you get restricted in the buyzone, you can still pick up grenades elsewhere just not in another buyzone).


Instead of using the console to configure my settings, I modified the settings in the cfg file and it seems to be working fine now.

I'm going to put it on my regular server and test it in game play. I'll report the results.

Thanks!


All times are GMT -4. The time now is 18:43.

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