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

Simple Weapon Restriction


Post New Thread Reply   
 
Thread Tools Display Modes
Author
WhiteWolf
Junior Member
Join Date: Oct 2007
Plugin ID:
200
Plugin Version:
1.5d
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Restricts weapons
    Unapprover:
    Reason for Unapproving:
    Reported to not be working.
    Old 10-24-2007 , 00:51   Simple Weapon Restriction
    Reply With Quote #1

    Fairly simple weapon restriction plugin, listed/tested on CS:S but should work for any source based game.

    Note: Does not refund any money for lost items or alert the player that the weapon is restricted. This is due to simplicity of the need on my servers. I am simply releasing this plugin for anyone who can make use of it. I suggest advertising your restricted weapons.

    Note2: When restricting items, it is necessary to include the full name of the weapon. For example: sm_restrict weapon_awp

    Note3: Won't work with TF2 until I get the offsets for it.

    Commands/cvars:
    sm_restrict <weapon> ; restricts a weapon from being picked up/bought
    sm_round_restrict <weapon ; restricts a weapon from being retained the next round
    sm_unrestrict <weapon> ; removes a pickup/bought restriction
    sm_round_unrestrict ; removes a start of round weapon restriction

    cvars:
    sm_enable_restrict 1/0 ; enables buy/pickup restrictions
    sm_enable_round_restrict 1/0 ; enables/disables round-start restrictions
    sm_roundcheck_delay <float seconds> ; the seconds from player spawn items are checked/removed -- needs to be about 0.2 in my experimentation

    I'll entertain bug fixes and simple feature requests.

    Credit given where credit due:
    devicenull - Original code [that now doesn't work] and helping me with a couple portions and entertaining me while I bugged him.
    dalto - Sell!; offsets to Weapon_Equip
    Attached Files
    File Type: zip wwrestrict.zip (9.3 KB, 1294 views)

    Last edited by WhiteWolf; 12-05-2007 at 15:44.
    WhiteWolf is offline
    Send a message via ICQ to WhiteWolf Send a message via MSN to WhiteWolf
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 10-24-2007 , 11:22   Re: Simple Weapon Restriction
    Reply With Quote #2

    We can't approve a plugin that admits there may be a handle memory leak. Please look into and resolve that if you wish for the plugin to be approved.
    __________________
    I'm a blast from the past!
    ferret is offline
    WhiteWolf
    Junior Member
    Join Date: Oct 2007
    Old 10-24-2007 , 12:02   Re: Simple Weapon Restriction
    Reply With Quote #3

    My plugin doesn't have any handle leaks as far as I can tell, including BAILOPAN reviewing the code.

    However, due to the fact one of the features of it uses GetMaxClients()/playercount one-shot timers every round -- it can reveal possible problems with the actual backend code in SourceMod dealing with timers, not necessarily my plugin. A conclusion I've been unable to support [except for a 600KB handles file with a bunch of timers] because it does not occur since revision 1600 thus far... hopefully it was fixed.
    __________________
    I'm currently working on sourcebans and steambans as a developer. Contribute today for a better product tomorrow.

    Last edited by WhiteWolf; 10-24-2007 at 12:05.
    WhiteWolf is offline
    Send a message via ICQ to WhiteWolf Send a message via MSN to WhiteWolf
    red!
    Senior Member
    Join Date: Sep 2007
    Location: Germany
    Old 10-24-2007 , 12:59   Re: Simple Weapon Restriction
    Reply With Quote #4

    looks like a nice light-weight plugin. but for my personal needs I miss some kind of team-based restrictions ...
    red! is offline
    ^BuGs^
    Senior Member
    Join Date: May 2007
    Old 10-24-2007 , 22:47   Re: Simple Weapon Restriction
    Reply With Quote #5

    There are a few memory leaks.
    __________________
    Sourcemod Plugin Author and Plugin Approver
    "The correct way is MAXPLAYERS + 1"
    I will not take bugs/new idea reports over the forums. Please use the issue list.
    ^BuGs^ is offline
    ModL.
    Junior Member
    Join Date: Oct 2007
    Location: Birmingham
    Old 11-10-2007 , 19:15   Re: Simple Weapon Restriction
    Reply With Quote #6

    Its kool and does everythink i want it too, can sombody edit the text so it doesnt say "checking for round restricted items.." so it doesnt say anythink.

    thanks
    __________________
    ModL. is offline
    Send a message via MSN to ModL.
    shamans
    New Member
    Join Date: Nov 2007
    Old 11-18-2007 , 11:39   Re: Simple Weapon Restriction
    Reply With Quote #7

    Hi ! this plugin doesn't work with TF2???
    It give me <error> when I load it.
    shamans is offline
    Norwegian Pirate
    Junior Member
    Join Date: Sep 2007
    Location: Sweden, Skåne
    Old 12-04-2007 , 22:05   Re: Simple Weapon Restriction
    Reply With Quote #8

    Does this plugin even work? and what is memory leak?


    EDIT: Can this plugin restrict flashbang?

    Last edited by Norwegian Pirate; 12-04-2007 at 22:07.
    Norwegian Pirate is offline
    WhiteWolf
    Junior Member
    Join Date: Oct 2007
    Old 12-05-2007 , 15:17   Re: Simple Weapon Restriction
    Reply With Quote #9

    It works, the memory leak was a sourcemod bug that was fixed.

    It can restrict flashbangs... use weapon_flashbang

    Updated to fix a couple bugs... see original post.
    __________________
    I'm currently working on sourcebans and steambans as a developer. Contribute today for a better product tomorrow.
    WhiteWolf is offline
    Send a message via ICQ to WhiteWolf Send a message via MSN to WhiteWolf
    Bloodlvst
    Senior Member
    Join Date: Jul 2007
    Old 12-05-2007 , 15:21   Re: Simple Weapon Restriction
    Reply With Quote #10

    I currently use Bugs' solutoni, and I'm looking for a simpler plugin. The only thing stopping me is that we need the ability to restrict a weapon to X per team.

    Do you know if you can do this? If not, now worries, I'm just curious.
    __________________
    Quote:
    skywalker: I have cs source client 5 how to upgrade to client 7
    BAILOPAN: oh
    Bloodlvst 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 18:31.


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