Skip to content
View in the app

A better way to browse. Learn more.

Learn more

buy-a-frag/README.txt

README.txt
57 lines · 2.5 KB · Text
Raw
Buy a Frag 1.0.0 (olds.ro)
==========================

Players spend money to gain an extra frag. The price rises with every frag
the player buys on the map, and only a few can be bought per round.

  - /buyfrag adds one frag; the scoreboard shows it at once.
  - The first frag on the map costs olds_bf_base (5000), each one after it
    olds_bf_step more (7500, 10000, 12500, ...). The count belongs to the
    player (by SteamID, so reconnecting does not reset it) and starts again
    at the next map.
  - At most olds_bf_max frags (3) per player per round.
  - Refused, with a chat line and no money taken: not on a team, the
    round's limit reached, not enough money (the current price is shown).
  - Every purchase is written to the server log with the player's name,
    SteamID, team and the price:
      "Name<uid><steamid><TEAM>" triggered "buy_frag" (price "5000")
  - After a purchase the player is told the price of the next frag.

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

Install
  1. Compile scripting/olds_buyfrag.sma and copy olds_buyfrag.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_buyfrag.txt to addons/amxmodx/data/lang/.
  3. Copy configs/plugins/olds_buyfrag.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_buyfrag.amxx to addons/amxmodx/configs/plugins.ini.

Settings (addons/amxmodx/configs/plugins/olds_buyfrag.cfg)
  olds_bf_base 5000        price of the first frag a player buys on the map
  olds_bf_step 2500        added to the price for each frag bought before
  olds_bf_max 3            frags a player can buy per round (0 = no limit)

Commands
  say /buyfrag, say_team /buyfrag   buy one frag

Chat text
  "[Frag] You bought a frag for $5000. The next one costs $7500." and the
  refusal lines are in data/lang/olds_buyfrag.txt and can be translated
  there.

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-0143. 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.