Raised This Month: $51 Target: $400
 12% 

[CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6.9b]


Post New Thread Reply   
 
Thread Tools Display Modes
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 05-19-2012 , 23:14   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #11

Small update: 1.6.1
- No warning at compilation ("tag mismatch" warning fixed)
- Chat message on plugin load simplified
__________________

*** *** ***
-My plugins-

Last edited by St00ne; 05-19-2012 at 23:19.
St00ne is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 10-04-2012 , 00:12   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #12

Cool plugin!

Why on earth is every printout using ShowActivity2 when it appears like they should be directed at clients?! There are a lot of PrintTo* Alternatives, as well as ReplyToCommand. You can actually use the %N format modifier instead of calling GetClientName if you don't need the string for anything. The TrimString native will save you from having to strip \n and \r manually, and will clear out other control characters. There are also a few definite of handle leaks: RegEx_SteamID/Arr_SteamIDs/Arr_Weapons are either trashed or lost. Your two file handles File_SteamIDList/File_WeaponsList have the potential to not be closed if either file doesn't exist, LogError may be appropriate in this case instead of ShowActivity2.

Hope this helps!
KyleS is offline
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 10-05-2012 , 17:27   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #13

Thanks a lot KyleS, I will see with the author if we can make something better.

Regards,

St00ne
__________________

*** *** ***
-My plugins-
St00ne is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 10-06-2012 , 11:16   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #14

Eh... I was bored so I rebuilt this plugin from scratch.
New features:
  • Uses a way better config system.
  • Integrates with Weapon Restrict for automatic warmup detection.
  • Uses a caching system to reduce server load.
  • Utilizes CS_OnBuyCommand and SDKHooks to completely block weapon purchases, rather than using harsh punishments like slaying.

I haven't tested this, but it looks like it would work fine, so please test this on a test server (not a live server) before putting it in your live servers.

New config system uses KeyValues to manage itself.
An example has been attached.

UPDATED 10/7/2012.

UPDATED AGAIN to 2.1

10/8 Version 2.2 - Fixes a serious bug and optimizes code
Read my other post for update information.
Attached Files
File Type: txt zk_wlbsid.txt (126 Bytes, 222 views)
File Type: sp Get Plugin or Get Source (steamid_restrict.sp - 224 views - 20.8 KB)
File Type: smx steamid_restrict.smx (13.3 KB, 200 views)
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING

Last edited by minimoney1; 10-08-2012 at 01:43.
minimoney1 is offline
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 10-06-2012 , 11:57   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #15

Quote:
Originally Posted by minimoney1 View Post
Eh... I was bored so I rebuilt this plugin from scratch.
New features:
  • Uses a way better config system.
  • Integrates with Weapon Restrict for automatic warmup detection.
  • Uses a caching system to reduce server load.
  • Utilizes CS_OnBuyCommand and SDKHooks to completely block weapon purchases, rather than using harsh punishments like slaying.

I haven't tested this, but it looks like it would work fine, so please test this on a test server (not a live server) before putting it in your live servers.

New config system uses KeyValues to manage itself.
An example has been attached.
Hi, thank you for your work. So we will test this and give feedback in a couple of days I think.

Regards,

St00ne
__________________

*** *** ***
-My plugins-
St00ne is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 10-06-2012 , 17:28   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #16

My apologies, I messed in 1 part of the code. Original post has been updated. I'll make sure to test it myself as well.
EDIT: I updated the plugin again.
The previous version didn't function at all as I messed up one part in the keyvalue iteration part. It should now be fine, but that means that the config structure has changed a tad bit.
i.e. it now looks something like this:
PHP Code:
"Steam ID Restrictions"
{
    
"STEAM_0:1:33637923"
    
{
        
"ak47" "resrict"
        "m4a1" "resrict"
        
//we blocked ak47 and m4a1
    
}

And you must have the "restrict" part in it, anything other than "restrict" makes it so that the weapon is not restricted to the user.
I have personally tested this and it functions as it should.
Please let me know of any suggestions or bugs that come up later on, and I will try my best to implement/fix them.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING

Last edited by minimoney1; 10-07-2012 at 15:36.
minimoney1 is offline
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 10-07-2012 , 19:58   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #17

Ok, so here is my feedback:

The plugin works fine, but there is a few things to know, and maybe one fix to do:
- To restrict mp5, you must add two lines:
one with "mp5" "restrict" AND one with "mp5navy" "restrict".

- Concerning warmup (this might need a fix):
zk_wlbsid_warmup -1 doesn't work for me. But it's ok because I can set it to 60 (according to sm_warmup_time).

- A good thing: zk_wlbsid_enabled 0 works fine and that's great because we had to use sm plugins unload zk_wlbsid.smx before... (The timer would automatically returns the value to 1 during the map if you tried to set zk_wlbsid_enabled to 0 in your sourcemod.cfg or map configs files.)

- I already told you via pm about the command which allowed admins to add a player, and I think you're already on it.
So I'll wait for that and then I'll edit 1st post.

Thanks a lot for your work.

St00ne
__________________

*** *** ***
-My plugins-

Last edited by St00ne; 10-29-2012 at 03:36.
St00ne is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 10-07-2012 , 21:08   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #18

Quote:
Originally Posted by St00ne View Post
Ok, so here is my feedback:

The plugin works fine, but there is a few things to know, and maybe one fix to do:
- To restrict mp5, you must add two lines:
one with "mp5" "restrict" AND one with "mp5navy" "restrict".

- Concerning warmup (this might need a fix):
zk_wlbsid_warmup -1 doesn't work for me. But it's ok because if I can set it to 60 (according to sm_warmup_time).

- A good thing: zk_wlbsid_enabled 0 works fine and that's great because we had to use sm plugins unload zk_wlbsid.smx before... (The timer would automatically returns the value to 1 during the map if you tried to set zk_wlbsid_enabled to 0 in your sourcemod.cfg or map configs files.)

- I already told you via pm about the command which allowed admins to add a player, and I think you're already on it.
So I'll wait for that and then I'll edit 1st post.

Thanks a lot for your work.

St00ne
I've already added the add and remove commands.
The mp5 + mp5navy issue is some stupid thing done by Valve, for you would imagine a weapons entity classname would be the same as its buy command name (with "weapon_" or "item_" stripped), but no, the names are different, so I left that up to the server owners to figure out and utilize, I could probably do this a different way to make it global using the css_weapons.inc (the same way the Weapon Restrictions plugin manages it), but that'd probably require a recoding of major features, and I'm not really willing to do that at the moment.

The warmup code looks fine to me but doesn't work, so I'll definitely check that out.

Side Note: I may open a new thread as this is a complete recode of the whole plugin and managing would be easier for me, but until then this thread should suffice.

Having said all that
UPDATE to version 2.1
Check the original post for the plugin.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING

Last edited by minimoney1; 10-07-2012 at 21:41.
minimoney1 is offline
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 10-08-2012 , 01:07   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #19

Hi,

I know that the mp5 stuff is a Valve issue, I just wrote it here to warn users about that. There's no need to change the script for that.

The warmup timer works fine except -1 value. I don't know why. This is the fix I said that was needed, otherwise the plugin works fine, I'm using it right now.

I'll check all that tomorrow I think and update the post to explain usage, give the new path, etc...
So I guess for now as you said you won't need to open a new thread, until you change a lot of things and want to be able to update the plugin as needed.

Regards,

St00ne
__________________

*** *** ***
-My plugins-
St00ne is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 10-08-2012 , 01:17   Re: [CS:S] Weapon Limiter (or Restricter) by SteamID [v1.6]
Reply With Quote #20

Quote:
Originally Posted by St00ne View Post
Hi,

I know that the mp5 stuff is a Valve issue, I just wrote it here to warn users about that. There's no need to change the script for that.

The warmup timer works fine except -1 value. I don't know why. This is the fix I said that was needed, otherwise the plugin works fine, I'm using it right now.

I'll check all that tomorrow I think and update the post to explain usage, give the new path, etc...
So I guess for now as you said you won't need to open a new thread, until you change a lot of things and want to be able to update the plugin as needed.

Regards,

St00ne
Are you sure we're talking about the same weapon restriction plugin for warmup?

Because I just tested it and it works.

EDIT: Version 2.2 is out. Check my original post for the plugin.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING

Last edited by minimoney1; 10-08-2012 at 01:41.
minimoney1 is offline
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 02:54.


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