Raised This Month: $154 Target: $400
 38% 

[CS:S] Emergency Pack


Post New Thread Reply   
 
Thread Tools Display Modes
Author
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Plugin ID:
2037
Plugin Version:
1.0.2
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    An emergency buy script that allows users to purchase a few items that may turn the tide of battle.
    Old 10-29-2010 , 15:12   [CS:S] Emergency Pack
    Reply With Quote #1

    Information:
    • This was originally a request, found here, but it looked like it could prove useful to other players so I turned it into a full plugin.
    • The plugin allows you to access an "emergency pack" when your health is low enough, where at you're able to purchase various items which may improve your survivability for a period of time.
    • All features of the plugin can be easily modified within the configuration file which is automatically generated after loading the plugin.
    • Depending on the configuration, you can purchase X Health, +X Speed, -X Gravity, X HE Grenades, X Smoke Grenades, and X Flashbangs.
    • Access the Emergency Pack menu by either sm_pack or sm_epack, or the sm_settings option.
    • If enabled, clients can use client preferences to enable the menu's auto popup feature should their health fall below the required amount.
    • If sm_emergencypack_required is set to 0, the plugin is no longer referred to as "emergency pack" and can be used for normal usage, such as providing a menu for purchasing extra grenades
    Cvars:
    • sm_emergencypack_enabled: Enables/disables all features of this plugin.
    • sm_emergencypack_required: The maximum amount of Health playrs can have in order to access this menu. (0 = Always)
    • sm_emergencypack_auto: If enabled, players will have the option of enabling/disabling the menu's auto toggle feature.
    • sm_emergencypack_health: The amount of Health players may purchase from this plugin. (0 = Disabled)
    • sm_emergencypack_health_cost: The amount that sm_emergencypack_health health costs. (-1.0 = Dynamic)
    • sm_emergencypack_speed: The amount of Speed players may purchase from this plugin. (0 = Disabled, 1.0 = Double Speed)
    • sm_emergencypack_speed_cost: The amount that sm_emergencypack_speed increased speed costs.
    • sm_emergencypack_gravity: The amount of Gravity players may purchase from this plugin. (0 = Disabled, 0.5 = Half Gravity)
    • sm_emergencypack_gravity_cost: The amount that sm_emergencypack_gravity increased gravity costs.
    • sm_emergencypack_grenade: The maximum amount of HE Grenades players may purchase from this plugin. (0 = Disabled)
    • sm_emergencypack_grenade_cost: The amount each HE Grenade will cost via this plugin.
    • sm_emergencypack_smoke: The maximum amount of Smoke Grenades players may purchase from this plugin. (0 = Disabled)
    • sm_emergencypack_smoke_cost: The amount each Smoke Grenade will cost via this plugin.
    • sm_emergencypack_flash: The maximum amount of Flashbangs players may purchase from this plugin. (0 = Disabled)
    • sm_emergencypack_flash_cost: The amount each Flashbang will cost via this plugin.
    Updates:
    • v1.0.0 ~ Plugin Released!
    • v1.0.1 ~ Fixed an incompatibility with 0 required health.
    • v1.0.2
      • Added a special case to most messages inside of the plugin in case sm_emergencypack_required is set to 0. Only if sm_emergencypack_required is greater than 0 will messages contain the word emergency.
      • Added two defines, HEALTH_MAXIMUM and HEALTH_FACTOR, which will allow you to easily change the maximum amount of health attainable by this plugin, and the factor that determines the dynamic health cost.
      • Added the cost of items to printed chat messages upon purchase.
      • Prevented the ability to repeatedly purchase gravity/speed benefits after paying for them once.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_emergency_pack.sp - 768 views - 22.3 KB)
    __________________

    Last edited by thetwistedpanda; 10-30-2010 at 14:23.
    thetwistedpanda is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 10-29-2010 , 22:59   Re: [CS:S] Emergency Pack
    Reply With Quote #2

    Another awesome idea, you really are outdoing yourself this month panda.
    Unfortunately the math says CSSDM (bail) will not work with this due to its configuration.

    I am trying to get a plug that allows me to increase the amount of HE Nades on spawn due to buying being disabled ... if your looking for more ideas ... and you want to be famous .. more famous than you are now that is .. of course
    __________________
    Happy Happy Joy Joy


    Last edited by sinblaster; 10-31-2010 at 16:01.
    sinblaster is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 10-29-2010 , 23:11   Re: [CS:S] Emergency Pack
    Reply With Quote #3

    I'm not sure what you mean by "Unfortunately the math says CSSDM (bail) will not work with this due to its configuration." And if you could explain the latter issue in more detail I'll see what I can come up with.
    __________________
    thetwistedpanda is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 10-29-2010 , 23:14   Re: [CS:S] Emergency Pack
    Reply With Quote #4

    Sorry Panda. I really should try it out before judging but my servers are being used. I just evaluated that with not being able to buy items in CSSDM this mod would be rendered useless?
    Same with my extra HE Nade issue. Players cant buy nades in CSSDM so the only work around I can see is that they are given x amount each spawn. Ive checked a few plugs in here and all require a player to buy extra items, none allow the configuration to give on spawn, I think it has to do with the slots for HE nades available
    __________________
    Happy Happy Joy Joy


    Last edited by sinblaster; 10-29-2010 at 23:16.
    sinblaster is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 10-29-2010 , 23:16   Re: [CS:S] Emergency Pack
    Reply With Quote #5

    Unless CSSDM disables the GivePlayerItem native, or monitors item_pickup and prevents players from picking up excessive grenades, it should work. The plugin creates its own panel (embedded within clientprefs, for some reason none other than laziness), which then uses that native to give out grenades if the feature is enabled. Although if CSSDM strips your cash, then yes, it'd definitely be useless.
    __________________
    thetwistedpanda is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 10-29-2010 , 23:20   Re: [CS:S] Emergency Pack
    Reply With Quote #6

    No it doesnt strip your cash. Ill set up a new server now so I can test it. Thanks Ill get back to you.
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 10-29-2010 , 23:55   Re: [CS:S] Emergency Pack
    Reply With Quote #7

    panda I am having a little trouble accessing the emergency pack.
    sm_emergencypack_required: The maximum amount of Health playrs can have in order to access this menu. (0 = Always)

    I have set sm_emergencypack_required "0"
    Type sm_epack into console.
    message: You cannot use the emergency pack if your health is above 0!
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 10-30-2010 , 00:14   Re: [CS:S] Emergency Pack
    Reply With Quote #8

    :-o! Quick fix coming up.

    Edit: v1.0.1 released, fixes an issue sm_emergencypack_required set to 0.
    __________________
    thetwistedpanda is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 10-30-2010 , 01:45   Re: [CS:S] Emergency Pack
    Reply With Quote #9

    Cool thanks mate that fixed that issue, menu is now always available ..
    So with settings:
    sm_emergencypack_required: The maximum amount of Health playrs can have in order to access this menu. (0 = Always)
    Set to "0"
    The issue with sm_emergencypack_auto set to "1" (enable toggle)
    Message = Pack: The emergency pack menu will automatically appear should you fall below 0 health.

    Then of course it states that you can't buy emergency items whilst dead lol.

    A cvar for fall below certain health to activate toggle?
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    MoshMage
    Junior Member
    Join Date: Oct 2010
    Old 10-30-2010 , 02:39   Re: [CS:S] Emergency Pack
    Reply With Quote #10

    thetwistedpanda you sir. You Rock. better yet, you MOUNTAIN. x)

    trully, lots of cvars and everything. i'm trully amazed

    just one doubt, tho. can i make calculations on sm_emergencypack_health_cost

    like that gizzmo i was saying about frags / kills * 1000 * score ?

    -- edit:
    it's cool if i can't. i guess it makes it fairer
    MoshMage 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 15:36.


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