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

Excessive Buy Punisher (formerly "Kicker")


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   Hawk552 (427)
pharse
Senior Member
Join Date: Jan 2008
Location: Germany, BW
Old 02-20-2008 , 16:06   Excessive Buy Punisher (formerly "Kicker")
Reply With Quote #1

As requested: http://forums.alliedmods.net/showthread.php?t=67229

Excessive Buy Punisher v1.1
by pharse


Description:
This plugin simply slays or kicks players who buy more than <items> items in <time> seconds (specified by CVars).
This is the case e.g. when trying to crash the server by buying lots of weapons with a buy script or when spamming grenades.

See below for some CVar examples of different use.
Features:
  • Delay time after a player spawns. During this time the picked up items aren't counted.
  • Option that picked up items are only counted during the buy time (defined by server CVar mp_buytime)
  • Option that only grenades are counted. Then completely different settings are probably necessary.
  • Two punishments: slay and kick
  • Logging to current AMXx logfile (good to track down troublemakers), in the following format:
    • Excessive Buy Punisher: PUNISHMENT "NAME<STEAM_ID>"
    • e.g.: Excessive Buy Punisher: slay "pharse<Steam_0:1:23456>"
CVars:
amx_ebp_enable <0/1> default: 1 -- dis-/enables the plugin

amx_ebp_items <10/11/...> default: 10 -- items that may be picked up in <time>

amx_ebp_time <1.0/2.0/...> default: 3.0 -- time in seconds

amx_ebp_delay <1.0/2.0/...> default: 3.0 -- delay time in seconds after spawn, during which the plugin is inactive

amx_ebp_buytimeonly <0/1> default: 1 -- defines if the plugin is active only during the buytime

amx_ebp_nadesonly <0/1> default: 0 -- defines if the plugin counts only grenades

amx_ebp_punishment <0/1> default: 0 -- 0=slay, 1=kick

amx_ebp_log <0/1> default: 1 -- dis-/enables logging to current AMXx logfile
Examples:
  • I have a server running a "unlimited money"-plugin. But some players keep buying weapons until the server lags or even crashes.
    • --> You may use the default settings.
  • I hate it when players spam nades at roundstart, e.g. on cs_office the CTs keep throwing HEs into the building.
    • amx_ebp_items 5
    • amx_ebp_time 10.0
    • amx_ebp_delay 0.0
    • amx_ebp_nadesonly 1
Requirements:
  • Compiled & tested with AMX Mod X v1.8.0
Changelog:
Version 1.0
  • initial release
Completely reworked: Version 1.1
  • new name! (formerly: Excessive Buy Kicker) Therefore all CVars changed!
  • new modules: cstrike (now mod-dependent!) & fakemeta
  • now catching actual buy-action instead of only weapon pickup
  • added CVars: delay, buytimeonly, nadesonly, punishment, log
  • changed description etc.
Attached Files
File Type: sma Get Plugin or Get Source (excessive_buy_punisher.sma - 2067 views - 10.2 KB)
__________________

Last edited by pharse; 02-25-2008 at 12:50. Reason: typo...
pharse is offline
chris
Senior Member
Join Date: Mar 2007
Location: America
Old 02-20-2008 , 17:50   Re: Excessive Buy Kicker
Reply With Quote #2

Down with the nade spammers!
__________________
chris is offline
Send a message via AIM to chris
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 02-22-2008 , 20:11   Re: Excessive Buy Kicker
Reply With Quote #3

Nice plugin , very useful ;D
__________________
atomen is offline
Send a message via MSN to atomen
Vm|Mayhem
Senior Member
Join Date: Feb 2005
Location: Murrieta, CA.
Old 02-23-2008 , 00:55   Re: Excessive Buy Kicker
Reply With Quote #4

Sounds nice, but it wasn't working on my server. I removed my admin status and was still able to spam weapons everywhere. I used default settings, maybe I'm not fast enough?

Last edited by Vm|Mayhem; 02-23-2008 at 00:59.
Vm|Mayhem is offline
Send a message via AIM to Vm|Mayhem
pharse
Senior Member
Join Date: Jan 2008
Location: Germany, BW
Old 02-23-2008 , 05:48   Re: Excessive Buy Kicker
Reply With Quote #5

yes, you were not fast enough. With the default settings you can only be kicked by using a buy script, mostly on servers with unlimited money - as it was requested. You have to change the CVars for other purposes. I'll have a look at it again, perhaps I implement a delay time after new round/spawn. Thus the "normal" buy isn't catched but the nade spammers.
__________________
pharse is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-23-2008 , 06:33   Re: Excessive Buy Kicker
Reply With Quote #6

What if i play on a unlimited money server, and i want to make a fast buy script to buy 15 weapons, but i just want to play with those weapons, not drop them ?
I mean, you could detect dropped weapons, may be red status icons.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
pharse
Senior Member
Join Date: Jan 2008
Location: Germany, BW
Old 02-23-2008 , 07:20   Re: Excessive Buy Kicker
Reply With Quote #7

This first version is mod-independant, but following versions will be only for CS.
So let's count...

1 primary weapon
1 secondary weapon
1 knife
1 HE
2 flashbangs (btw, have to fix it that the 2nd one is catched aswell)
1 smoke
(1 C4)
_________
7 ( 8 ) weapons to be picked up - for normal purposes. Any higher amount is caused by either vicious intentions or a mis-buy (pity )


Quote:
I mean, you could detect dropped weapons, may be red status icons.
Don't know exactly what you mean... where is a red status icon when picking up weapons?
The only solution I can think of is catching the actual buy-action. Kind of too much effort for such a small plugin. I'll see if a find a nice workaround ;)
__________________
pharse is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-23-2008 , 07:36   Re: Excessive Buy Kicker
Reply With Quote #8

Well, i thought that on some server you can pick up multiple weapons (3 handguns for example)

For red icon...hmm...my bad, there's only a red one when you drop c4, not with other weapons.

I just thought of another way, forward some SetModel or something else and check pev_owner.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 02-23-2008 , 16:02   Re: Excessive Buy Kicker
Reply With Quote #9

This wont work well whit buyscripts or rebuy options becase the weapon pickup event will be calld each time you recive a item/weapon right?
__________________
If one of my plugins become broken, contact me by mail. [email protected]
fxfighter is offline
Send a message via MSN to fxfighter
Vm|Mayhem
Senior Member
Join Date: Feb 2005
Location: Murrieta, CA.
Old 02-23-2008 , 19:04   Re: Excessive Buy Kicker
Reply With Quote #10

Quote:
Originally Posted by pharse View Post
yes, you were not fast enough. With the default settings you can only be kicked by using a buy script, mostly on servers with unlimited money - as it was requested. You have to change the CVars for other purposes. I'll have a look at it again, perhaps I implement a delay time after new round/spawn. Thus the "normal" buy isn't catched but the nade spammers.
I was using a buy script and filled the ground with guns (cs) and my server is unlimitted ammo.

I changed the cvars and it worked:

amx_ebk_time "3.0"
amx_ebk_items "10"
amx_ebk_enable "1"

Good work! plus karma.

Last edited by Vm|Mayhem; 02-23-2008 at 19:47.
Vm|Mayhem is offline
Send a message via AIM to Vm|Mayhem
Reply



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 18:06.


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