PDA

View Full Version : [css] weapons limitation


Skalp
12-17-2011, 12:05
Hi !
I didn't find a plugin like this for sourcemod,,
If possible,

when a player got a kill/death ratio >= 3
==> can't use / buy M4 or Ak

can it be done ?

Skalp
12-30-2011, 02:37
up -_-
Can anyone tell me why this sort of plugin can't be done ??
i don't understand why ,,, it should be one of the easiest think to do ! no ?

thanks

lokizito
12-31-2011, 16:36
The reason isn't the difficulty to make it, but its utility. I honestly can't much use for this, the opposite though, makes a little of sense.
Anyway, you are refering to KDR on the map, not in a rank? If so, it is easy. If not, it is a little harder because it would need to get data from the rank.

TnTSCS
12-31-2011, 21:42
Skalp... few questions:

1. What if the player currently has an M4/AK when they reach the KDR of 3? Should they drop the weapon right then or wait till the round is over?

2. Should bomb defuse/plant(explode) points be calculated differently or just simply use the kills / deaths ratio? Example, say a player has 6 "kills" and 2 deaths, but those 6 kill points were from bomb defuses... he would still have a 3 KDR, but not really because he didn't actually kill anyone...

3. Do you want to prohibit the player from being able to disconnect and reconnect to be able to buy/use M4/AK weapons and only clear the restriction when the map changes?

Skalp
01-01-2012, 13:40
Thx a lot for you're answers !

It's for a serv with both low and mid player,
before the orangebox we played with a plugin called "antiroxx"

->just with the KDR and without bomb points
->yes, they should drop the weapons as soon as they reach the KDR ratio
->it would be better if the restriction change only at the next map and not with a retry ^^
->if possible ,,, the plugin should run when the player reach 12 kill and ,,, if a config file could be created ,,, to manage wich weapons are limitated ,,,

I think i'm asking too much ^^
again,,,thx you very much for yours answers

TnTSCS
01-02-2012, 22:50
Okay - I'll start on this next... actually, I have most of it coded, just need to put in the way you want to handle things. It's very close to my SniperRestrict (http://forums.alliedmods.net/showthread.php?p=1523047) just with KDR instead of sniper kills.

Skalp
01-03-2012, 01:00
Ooh ,, nice !
A large community is now jumping around ^^
I know other server who should be interrested with such a plugin !
THx TnTSCS !

TnTSCS
01-14-2012, 15:42
sorry, this one hit the back burner - I'll finish it up

TnTSCS
01-29-2012, 16:48
This is done, however, one remaining question - did you want to issue the player a replacement weapon when they are forced to drop the restricted weapon?

Skalp
01-29-2012, 17:31
Oh well,,, thank you !:up:
No need of a weapon replacement !
they can use gun ^^ or throwing knives ^^
tell us when everythings ok !
+

TnTSCS
01-30-2012, 00:28
Give this a shot - if you like it, then maybe I'll post it in the new plugins in case others are looking for something similar, or maybe the KDR feature can be added to the WeaponRestrict 3.0 plugin.

This plugin requires SDKHooks to work. And, unless you're going to compile it yourself, you'll have to download the attached SMX file.

Skalp
01-30-2012, 06:14
Ok ,,,
nice job
everythings work !
is it just possible to have a config file -_-'
to change
-when the kdr start (now at 12 kills)
-ad weapons to limitation (snips,pm, deagle, etc,,,)

we use WeaponRestrict 3.0 to,,,
so,, as you whant to make it a stand alone or not

TnTSCS
02-25-2012, 11:01
I'm working on enhancing this plugin with the following request:

now, if the player reach 9 frags and have kdr 3 (ideally if we can use a config file) he can only use glock, usp, fiveseven, p228 or dual and, if he have 20 kills,,,he can only use usp or glock

TnTSCS
02-25-2012, 18:02
I need clarification. When a player reaches 9 kills (or 20) do you want them to be able to ONLY use those weapons you listed? So, if a player has 9 kills and their KDR is >= 3.0 (or whatever you set), then the should only be allowed to buy/use those pistols you listed, and they can NOT buy any rifles, right? Same when they reach 20 kills?

Skalp
02-26-2012, 02:01
right,
with 9, they can only use/buy gun exept deagle
with 20, they can only use/buy usp or glock

TnTSCS
02-26-2012, 10:36
okay. I have a "working version" that does what you want, I just need to test a bit more, then clean up the code and retest :)

Skalp
02-27-2012, 01:22
Nice !
Tell when i can test it ^^

TnTSCS
02-27-2012, 17:00
give this one a shot. It has a couple of new CVars, and a config file will be created in cfg/sourcemod called plugin.kdr_weapon_limit.cfg

Oh, and an updated translation file

St00ne
02-27-2012, 18:12
Hi there,

Just to let you know that there already is a plugin out there to restrict weapons to some players only:

You just have to check your hlstatsx or psychostats pages sometimes and manually add players you want to restrict in a textfile.
Wepons to be restricted are also configurable.

-> http://forums.alliedmods.net/showthread.php?p=1624233

Regards,

St00ne

TnTSCS
02-27-2012, 18:36
I think what the requester wants is not a static restriction, but a dynamic one. Basically, if a player is just pounding on other players, this plugin will slowly diminish that dominating player's list of weapons they can use. It starts with restricting them from using M4/AK if they reach X.X KPD. Then if they still have X.X KPD and they reach 9 kills, they can only use pistols (sans the deagle), then if they still have X.X KPD and they reach 20 kills, they can only use USP/Glock (and knife).

Skalp
02-28-2012, 01:21
right,
this sort of plugin was called "antiroxx" before orangebox
we can found some request if we make a search ^^

thx TnTSCS !! i'll try it today,,,

TnTSCS
02-28-2012, 10:58
yes, antiroxx evenscripts plugin... I think this SM version is pretty close

http://translate.google.com/translate?hl=en&sl=fr&tl=en&u=http%3A%2F%2Fforums.eventscripts.com%2Fview topic.php%3Ff%3D58%26t%3D33061%3F%2520target% 3D

Skalp
03-01-2012, 09:57
hi,
i've tested the plugin
but ,,
in this version,,,
if a player make 3/0 he is limited with ak and m4 ( kdr 3)
if he had 9 frags (no kdr)

in fact the plugin should only start with 9 frag and kdr 3
ex : if a player have 9/0 , 9/1 , 9/2, or 9/3 ,,,the plugin start
and he can only use gun exept deagle

you was wright when you said
"if a player has 9 kills and their KDR is >= 3.0 (or whatever you set), then the should only be allowed to buy/use those pistols"

my answer was incorrect (my bad english again)

and the second with 20 frag is without the kdr

sry -_-

TnTSCS
03-01-2012, 23:06
Okay, clarify for me.

Player has 3/0 = what?

player has 7/0 = what?

player has 9/2 = what

player has 9/8 = what?

player has 20/5 = what?

player has 25/20 = what?

Skalp
03-02-2012, 01:31
Player has 3/0 = nothing

player has 7/0 = nothing

player has 9/2 = all guns exept deagle (9 kills and their KDR is >= 3.0 )

player has 9/8 = nothing (he have 9 but not a kdr >= 3)

player has 20/5 = usp or glock (he have kills >=20 )

player has 25/20 = usp or glock (he have kills >=20 )

sry to not have explain it clearly before

TnTSCS
03-08-2012, 11:22
okay, I'll try to finish this up later today - at work right now

Skalp
03-12-2012, 16:28
ok,, thx

TnTSCS
03-12-2012, 16:40
lawl - I keep forgetting about this one - going to eMail myself... I'm off tomorrow and wednesday, I'll get it done.

TnTSCS
03-13-2012, 14:17
clarify:
player has 9/2 = all guns exept deagle (9 kills and their KDR is >= 3.0 )

all GUNS or all HANDGUNS?

I need to know because in the beginning you were wanting to block the purchase/use of ak/m4 once the KDR was reached.

Skalp
03-13-2012, 19:39
^^
with 9/2 they can only use gun (usp, glock, p228, fiveseven, and dual (not deagle , and no first weapon such as m4, p90, ak, etc,,,))

TnTSCS
03-14-2012, 00:10
okay, so I can drop the blocking of the AK/M4 then. I coded it today and tested it - but turned off my server for the night and I'm tired. I'll post the new version tomorrow - in about 15 hours.

Skalp
03-15-2012, 05:11
ok,,nice,,,Tell us when we can test it ^^

TnTSCS
03-15-2012, 18:29
Sorry about that... give this a try.

New CVars now, delete old config file, let the plugin create a new one and modify it how you want.

Skalp
03-20-2012, 03:09
Ok,,,
we tested it ,,,everythings nice
just one think -_- ,,,
T when limited can't use bomb !

TnTSCS
03-20-2012, 08:03
Okay, I'll fix it in the code... Until I do, put c4 in both lists of allowed weapons and it should allow them touse the bomb

Skalp
03-20-2012, 10:01
Ah ! ok
if just with adding "c4" it works
you don't have to fix it,, maybe just to place it as "defaut"
thx

TnTSCS
03-20-2012, 11:36
actually, looking at the code, I still need to fix it... I'll try to post an update today if I can

TnTSCS
03-21-2012, 21:42
Give this a shot - I reworked some of the code and also fixed the sound precache issue.

Skalp
03-30-2012, 01:56
Ok !
nice ,this antiroxx like is now working perfectly !!
thx for all the time you spend for it
and the way you make it
,,,the config file is very usefull !

again thx TnTSCS !!!

stoneyschillhouse
11-28-2012, 15:27
I like this plugin

But is it possible to use to a second varibale of sm_kdrwl_ratio to manage sm_kdrwl_weapons_2 ??

like: KDR 2-3 usp + glock allowed

KDR 3+ only knife ??