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

[HL2:DM] BlackMarket (1.1, 2015-03-10)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
infinite_
SourceMod Donor
Join Date: Mar 2015
Plugin ID:
4547
Plugin Version:
1.1
Plugin Category:
Gameplay
Plugin Game:
Half-Life 2 Deathmatch
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Money system and store for HL2DM
    Old 03-10-2015 , 22:45   [HL2:DM] BlackMarket (1.1, 2015-03-10)
    Reply With Quote #1

    BlackMarket: Store for HL2: Deathmatch

    -Description

    A fully customizable money and store system for Half-Life 2: Deathmatch. This is a SourceMod remake of a plugin I made 4 or 5 years ago for EventScripts. I made this mostly for my own enjoyment and to gain experience writing SourceMod plugins, and decided it wouldn't hurt to release and support it even though the DM community is rather depressed compared to back when I made the original plugin.

    The plugin allows users to gain money by getting kills. Each weapon rewards a different amount of money as dictated by the plugin's CVARs. Within 20 seconds (default) of spawning, the player can make item purchases using the money they gained in their previous life. The money that will be awarded to the player after they die always starts at zero.

    -CVars and Commands

    sm_bm: Open the store menu. (Can only be used within 20 (default) seconds of spawning).

    CVars:

    Quote:
    // ConVars for plugin "blackmarket.smx"

    // Public BlackMarket version ConVar
    // -
    // Default: "1.1"
    bm_blackmarket_version "1.1"

    // Amount of time after a player spawns to allow purchases.
    // -
    // Default: "20.0"
    bm_buytime "20.0"

    // Sets whether BlackMarket is enabled
    // -
    // Default: "1"
    bm_enable "1"

    // Cost to buy a 357.
    // -
    // Default: "750"
    bm_cost_357 "750"

    // Cost to buy 357 ammo.
    // -
    // Default: "50"
    bm_cost_ammo_357 "50"

    // Cost to buy AR2 ammo.
    // -
    // Default: "50"
    bm_cost_ammo_ar2 "50"

    // Cost to buy shotgun ammo.
    // -
    // Default: "50"
    bm_cost_ammo_shotgun "50"

    // Cost to buy an AR2.
    // -
    // Default: "300"
    bm_cost_ar2 "300"

    // Cost to buy an AR2 ball.
    // -
    // Default: "200"
    bm_cost_ar2ball "200"

    // Cost to buy a battery.
    // -
    // Default: "100"
    bm_cost_battery "100"

    // Cost to buy an RPG.
    // -
    // Default: "1500"
    bm_cost_rpg "1500"

    // Cost to buy a shotgun.
    // -
    // Default: "400"
    bm_cost_shotgun "400"

    // Cost to buy a S.L.A.M.
    // -
    // Default: "200"
    bm_cost_slam "200"

    // Cost to buy a SMG nade.
    // -
    // Default: "200"
    bm_cost_smgnade "200"

    // Reward from a kill using the 357.
    // -
    // Default: "100"
    bm_reward_357 "100"

    // Reward from a kill using the AR2.
    // -
    // Default: "150"
    bm_reward_ar2 "150"

    // Reward from a kill using a combine ball.
    // -
    // Default: "150"
    bm_reward_comball "150"

    // Reward from a kill using the crossbow.
    // -
    // Default: "100"
    bm_reward_crossbow "100"

    // Reward from a kill using the crowbar.
    // -
    // Default: "300"
    bm_reward_crowbar "300"

    // Reward from a kill using a grenade.
    // -
    // Default: "150"
    bm_reward_grenade "150"

    // Reward from a kill using a physics prop.
    // -
    // Default: "150"
    bm_reward_physics "150"

    // Reward from a kill using the pistol.
    // -
    // Default: "250"
    bm_reward_pistol "250"

    // Reward from a kill using the RPG.
    // -
    // Default: "100"
    bm_reward_rpg "100"

    // Reward from a kill using the shotgun.
    // -
    // Default: "150"
    bm_reward_shotgun "150"

    // Reward from a kill using the S.L.A.M.
    // -
    // Default: "150"
    bm_reward_slam "150"

    // Reward from a kill using the SMG.
    // -
    // Default: "200"
    bm_reward_smg "200"

    // Reward from a kill using a SMG grenade.
    // -
    // Default: "100"
    bm_reward_smgnade "100"

    // Reward from a kill using the stunstick.
    // -
    // Default: "300"
    bm_reward_stunstick "300"
    -Changelog

    Quote:
    2015-03-11 (v1.1)
    -Added support for combine ball kills.
    -Fixed some errors related to killing timers.

    2015-03-10 (v1.0)
    -Initial Release
    -Installation

    -Extract the contents of the zip archive to your hl2mp folder. Alternatively, put the .smx file in your plugins folder.

    -Configure cfg/sourcemod/blackmarket.cfg. If you did not download it in the archive it will be generated automatically with the default settings.

    -Dependencies

    This plugin uses the custom include file morecolors.inc, which can be found here. It is only required if you are compiling the source yourself.

    EDIT: It appears the forum's "get plugin" option will compile it using the web compiler, I assume this will not work properly.

    -Plans

    -Possibly add CVar control to disable certain items from displaying in the store.

    -Screenshots

    One Two

    -More Info

    -I recommend running this plugin alongside a spawn protection plugin, to prevent users from getting shot while buying items.

    -This plugin has only been tested on linux, although I'm sure it's simple enough of a plugin to work on both platforms fine.
    Attached Files
    File Type: zip BlackMarket_v1.1.zip (28.2 KB, 348 views)
    File Type: smx blackmarket.smx (16.7 KB, 355 views)
    File Type: sp Get Plugin or Get Source (blackmarket.sp - 429 views - 19.0 KB)

    Last edited by infinite_; 03-13-2015 at 20:26. Reason: forgot to update version
    infinite_ is offline
    painkiller
    Senior Member
    Join Date: Jun 2011
    Old 03-22-2015 , 05:45   Re: [HL2:DM] BlackMarket (1.1, 2015-03-10)
    Reply With Quote #2

    Very Nicely, there are not many people like you.

    The ever do something for HL2DM.

    Very nice plugin I used to still loving your old EventScripts plugin;)
    painkiller is offline
    TheLaser
    Senior Member
    Join Date: Jan 2008
    Location: USA VA
    Old 02-18-2016 , 13:07   Re: [HL2:DM] BlackMarket (1.1, 2015-03-10)
    Reply With Quote #3

    This still works great and I have added my new guns to the menu as well because of how you scripted this it was easy


    HL2DM still lives
    TheLaser 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 19:05.


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