Skip to content
View in the app

A better way to browse. Learn more.

Learn more

buyable-helmet/README.txt

README.txt
57 lines · 2.5 KB · Text
Raw
Buyable Helmet 1.0.0 (olds.ro)
==============================

A player who already wears Kevlar can buy just the helmet, with a chat
command or a console command, instead of buying the whole Kevlar + helmet
set again. The armor points he has are kept.

  - The helmet costs olds_bh_price (350).
  - Buying works only while alive and inside the player's own buy zone,
    and (with olds_bh_buytime 1) only during the buy time (mp_buytime).
  - Refused, with a chat line and no money taken: no Kevlar (the player is
    told to buy Kevlar first), a helmet already on, not enough money (the
    price is shown), outside the buy zone, after the buy time.
  - The typed chat command is not shown in chat.

Requirements
  - ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
  - AMX Mod X 1.10.0.5490 or newer, with the cstrike module (enabled by
    default)

Install
  1. Compile scripting/olds_buyhelmet.sma and copy olds_buyhelmet.amxx to
     addons/amxmodx/plugins/. The compiler needs ReAPI's include files
     (reapi.inc and the reapi_*.inc files from the ReAPI release, in
     addons/amxmodx/scripting/include/) next to the stock AMX Mod X includes.
  2. Copy data/lang/olds_buyhelmet.txt to addons/amxmodx/data/lang/.
  3. Copy configs/plugins/olds_buyhelmet.cfg to
     addons/amxmodx/configs/plugins/ and change the values you want.
     (If the file is missing, the plugin writes one with the defaults the
     first time it starts.)
  4. Add olds_buyhelmet.amxx to addons/amxmodx/configs/plugins.ini.

Settings (addons/amxmodx/configs/plugins/olds_buyhelmet.cfg)
  olds_bh_price 350        price of the helmet
  olds_bh_buytime 1        1 = only during the buy time; 0 = any time, but
                           still only inside the buy zone

  The buy time is the server's own mp_buytime (minutes; -1 = no limit).

Commands
  say /buyhelmet, say_team /buyhelmet   buy a helmet
  helmet                                the same from the console or a key
                                        (bind x helmet)

Chat text
  "[Helmet] You bought a helmet for $350." and the refusal lines are in
  data/lang/olds_buyhelmet.txt and can be translated there. The sound is the
  game's own items/ammopickup1.wav, so nothing is downloaded.

Tested on
  ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814, Metamod-r 1.3.0.149,
  AMX Mod X 1.10.0-git5490, ReAPI 5.29.0.358.

Credits and licence
  Written from scratch by alexit (olds.ro workshop) for workshop card
  LIB-0148. Licence: GNU General Public License v3.0 or later
  (GPL-3.0-or-later).

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.