Monthly Target: $400 Donations: $23
 5% 

[CS:S] Grenade Pack 2


Post New Thread Reply   
 
Thread Tools Display Modes
Author
TnTSCS
SourceMod Donor
Join Date: Oct 2010
Location: Undisclosed...
Plugin ID:
2660
Plugin Version:
1.0.8
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Approver:
    Plugin Description:
    Allows and/or restricts players to a given number of he grenades, smoke grenades, and flashbangs
    Servers with this Plugin:
    33 
    Old 11-15-2011 , 23:38   [CS:S] Grenade Pack 2
    Reply With Quote #1

    DESCRIPTION:
    Allows players and VIPs to be able to carry more than the normal 1 hegrenade, 2 flashbangs, and 1 smoke grenade.

    You can set VIP players to be able to carry more than regular players with the CVars.

    "grenadepack2_vip" is the command you can use to override the default CUSTOM1 (or "o") flag I set for VIPs.

    WHY THIS PLUGIN?
    There is Greyscale's Grenade Pack V1.5 but his only allows players to carry extra hegrenades. A request was put in that thread asking for the ability to allow players to carry more flashes and smokes, but he said, at the time, it may not be possible.

    Valve, as you may or may not know, finally fixed the ammo_<weapon>_max cvar to work with hegrenades, flashbangs, and smoke grenades. This is cool, but that means that if you change them to 4 or something, then EVERY player can have 4.

    I thought it would be a good idea to implement a plugin to allow VIP players to have more than the normal and limit the regular players to the normal (or maybe slightly enhanced).

    I didn't write this plugin to fully restrict players from not being able to buy nade type weapons, but if requested, I could add that (the change would be to set the CVar to 0 to restrict that type of nade).

    CVARS:
    Code:
    sm_grenadepack2_announce         3
    sm_grenadepack2_enabled          1
    sm_grenadepack2_flashbang        2
    sm_grenadepack2_flashbang_vip    4
    sm_grenadepack2_hegrenade        1
    sm_grenadepack2_hegrenade_vip    3
    sm_grenadepack2_smokegrenade     1
    sm_grenadepack2_smokegrenade_vip 2
    sm_grenadepack2_enforce          0
    ammo_hegrenade_max is tied to sm_grenadepack2_hegrenade_vip
    ammo_smokegrenade_max is tied to sm_grenadepack2_smokegrenade_vip
    ammo_flashbang_max is tied to sm_grenadepack2_flashbang_vip

    If you set the regular (non _vip) cvars to something higher than the VIP cvar, the VIP cvar will be adjusted to match the regular cvar
    if you set the VIP cvar to something lower than the regular (non _vip) cvar, the regular cvar will be adjusted to match the VIP cvar

    REQUIREMENTS:
    SDKHooks

    SUGGESTED PLUGINS:
    Updater

    SPECIAL THANKS:
    Greyscale for the original Grenade Pack

    INSTALLATION:
    To install this plugin, copy the .smx file to your "cstrike\addons\sourcemod\plugins" folder; copy the .txt file to your "cstrike\addons\sourcemod\translations" folder. Change the map on the server or restart it.
    A configuration file (GrenadePack2.plugin.cfg) in your "cstrike\cfg\sourcemod" folder will be created. Edit it to your liking (just don't have the _vip cvars less than the corresponding regular ones). If you make changes to the config file they will take affect on the next map change or server restart.

    This plugin is Updater enabled so if there are any updates it will automatically be applied if you have Updater set to auto-install.

    Feel free to add your own translations to the translation file, or reply here and I'll add them.

    You'll either have to compile the plugin yourself or download the attached .smx file because the web compiler will not compile it due to the includes.

    Change Log


    ** NOTE **
    If you're updating to 1.0.2, you'll need to download the updated translation file too. Also, backup your config file, delete it and let the plugin create a new one for you to edit since I added a new CVar
    Attached Files
    File Type: txt grenadepack2.phrases.txt (2.8 KB, 731 views)
    File Type: sp Get Plugin or Get Source (GrenadePack2.sp - 313 views - 23.7 KB)
    File Type: smx GrenadePack2.smx (12.2 KB, 353 views)
    __________________
    View my Plugins | Donate

    Last edited by TnTSCS; 03-15-2013 at 17:41. Reason: Update from 1.0.7 to 1.0.8
    TnTSCS is offline
    wtfaatp
    Senior Member
    Join Date: Jul 2010
    Old 12-22-2011 , 01:53   Re: [CS:S] Grenade Pack 2
    Reply With Quote #2

    I Have a simple request. Could you restrict the amount of nades bought?

    Yes I know there are a couple out there but if it was just included in this it make things easier.
    __________________
    SourceMod : 1.5.2 (Official) | MetaMod : 1.10.0 (Official)
    Server : NFOservers - Windows
    wtfaatp is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 12-22-2011 , 10:37   Re: [CS:S] Grenade Pack 2
    Reply With Quote #3

    So, put a CVar to restrict them to only buy, say, 1 nade, but still be able to pick up and hold, say, 3?
    TnTSCS is offline
    wtfaatp
    Senior Member
    Join Date: Jul 2010
    Old 12-25-2011 , 01:46   Re: [CS:S] Grenade Pack 2
    Reply With Quote #4

    What ever is easier.. Was thinking make it so that it only allows what ever there cvar is.
    Like if I have "sm_grenadepack2_flashbang 2" then a normal person could only buy 2. Pick up as many as they want however. If I had "sm_grenadepack2_flashbang_vip 4" then VIP would buy 4 and reg member still on buy 2.

    If thats not possible no worries


    Edit : I'm a little lost about this also -
    Quote:
    If you set the regular (non _vip) cvars to something higher than the VIP cvar, the VIP cvar will be adjusted to match the regular cvar
    if you set the VIP cvar to something lower than the regular (non _vip) cvar, the regular cvar will be adjusted to match the VIP cvar
    If i have non vip higher then reg which one does it decide to take as default?
    sm_grenadepack2_flashbang 4
    sm_grenadepack2_flashbang_vip 2

    Would everyone be able to buy 4? Or would it go with everyone is allowed to buy 2?
    __________________
    SourceMod : 1.5.2 (Official) | MetaMod : 1.10.0 (Official)
    Server : NFOservers - Windows

    Last edited by wtfaatp; 12-25-2011 at 01:50.
    wtfaatp is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 12-25-2011 , 10:27   Re: [CS:S] Grenade Pack 2
    Reply With Quote #5

    This plugin is already designed how you're asking... if I understand you correctly.

    If you have sm_grenadepack2_flashbang 2 and sm_grenadepack2_flashbang_vip 4 then regular players can only buy 2 but VIPs can buy 4

    If you have:
    sm_grenadepack2_flashbang 4
    sm_grenadepack2_flashbang_vip 2

    then everyone will be able to buy 4

    The purpose of this plugin was to allow you to have a VIP feature with grenades on your server so regular players couldn't buy as many as VIP players. VIP players get a little extra treat with the ability to buy more than the regular player

    Last edited by TnTSCS; 12-25-2011 at 10:28.
    TnTSCS is offline
    schwarz
    Member
    Join Date: Nov 2011
    Old 01-12-2012 , 17:00   Re: [CS:S] Grenade Pack 2
    Reply With Quote #6

    Hi

    It don t work for only admin flag kick . When i set it
    sm_grenadepack2_flashbang 1
    sm_grenadepack2_flashbang_vip 3
    sm_grenadepack2_hegrenade 1
    sm_grenadepack2_hegrenade_vip 3
    sm_grenadepack2_smokegrenade 1
    sm_grenadepack2_smokegrenade_vip 3

    I tired to become normal player , I 've bought 3 nade... bug?

    thanks
    __________________

    schwarz is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 01-12-2012 , 17:16   Re: [CS:S] Grenade Pack 2
    Reply With Quote #7

    You must not be setting yourself as a normal player correctly. Basically, a player without the admin flag "o" (or custom1) the player, with your settings, would only be able to buy 1 flashbang, 1 hegrenade, and 1 smokegrenade.

    If you have root access, then you will not be limited and you can buy the max (VIP) ammount.

    To change the default admin flag I set for this plugin (which I see I forgot to mention in the OP), just set "grenadepack2_vip" to whatever flag you want in the admin_overrides.cfg file

    The below example would change the flag needed to be VIP for this plugin from "o" to "c" (for admin flag kick)
    example override

    Last edited by TnTSCS; 01-12-2012 at 17:16.
    TnTSCS is offline
    schwarz
    Member
    Join Date: Nov 2011
    Old 01-12-2012 , 18:00   Re: [CS:S] Grenade Pack 2
    Reply With Quote #8

    ok thanks i try to set it overrides.
    But before I edited it ADMFLAG_CUSTOM2 , but all players bought 3 nades...

    I hope it will work

    thanks
    __________________


    Last edited by schwarz; 01-12-2012 at 18:03.
    schwarz is offline
    TnTSCS
    SourceMod Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 01-12-2012 , 18:25   Re: [CS:S] Grenade Pack 2
    Reply With Quote #9

    it should work, because I put in your settings that you posted and removed my STEAM from the admins_simple.ini, restarted my server (so the admin file gets updated, I guess I could have just changed the map, but I like restart), joined my server and I was only able to buy 1 of each.
    __________________
    View my Plugins | Donate
    TnTSCS is offline
    schwarz
    Member
    Join Date: Nov 2011
    Old 01-13-2012 , 13:37   Re: [CS:S] Grenade Pack 2
    Reply With Quote #10

    Well it works. But I found a bit bug. When I bought 3 nade grenade , then i will be dead , other player normal can to throw it 3 nades .
    __________________

    schwarz is offline
    Reply


    Thread Tools
    Display Modes

    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 17:58.


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