Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Featured Replies

  • Administrator

Let two nearby humans consent to transferring some of their existing armor.

Armor Loan 1.0.0 (olds.ro)

Biohazard: a human offers some of their own armor to a nearby human; the other player accepts or declines in a menu. Armor only moves between the two: the combined total never changes.

Requirements

  • ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
  • AMX Mod X 1.10.0.5490 or newer (cstrike module)
  • Biohazard (library "biohazardf", is_user_zombie())

Install

  • Compile scripting/olds_armorloan.sma and copy olds_armorloan.amxx to addons/amxmodx/plugins/, below biohazard.amxx. The compiler needs ReAPI's include files.
  • Copy data/lang/olds_armorloan.txt to addons/amxmodx/data/lang/.

Use

  say /armorloan <name> <amount>   offer armor (1 to olds_armorloan_max)

Settings (addons/amxmodx/configs/plugins/olds_armorloan.cfg, created on first run)

  olds_armorloan_range 200   most distance between the two players (50-1000)
  olds_armorloan_max 50      most armor in one offer (1-100)

Details

  • The recipient gets a menu: Accept or Decline. An offer lasts 15 seconds; a new offer, a decline, either player leaving or a round restart cancels it.
  • On Accept everything is checked again: both connected, alive and human, still within range, and the donor still has armor.
  • The amount moved is the smallest of the offer, the donor's armor and the room the recipient has left (armor holds at most 100): donor 80 and recipient 70 with an offer of 50 moves 30, and the total stays 150. If nothing fits, nothing moves.
  • A recipient without armor gets a plain vest; armor is read and written with cs_get_user_armor / cs_set_user_armor in one step.
  • Both hear the stock items/ammopickup2.wav, and the loan is logged.

No downloads: a menu, chat and a stock sound.

Install

Download the ZIP above and copy its folders into cstrike/. Compile the .sma in addons/amxmodx/scripting with the AMX Mod X 1.10 compiler, put the .amxx in addons/amxmodx/plugins, and add it to plugins.ini.

Files: addons/amxmodx/scripting/olds_armorloan.sma, test/bh_stub.sma

Idea: olds.ro workshop library · Plugin: daemon · Tested automatically (compiled on AMX Mod X 1.8.2, 1.9 and 1.10, played on a CS 1.6 test server)
License: GPL-3.0-or-later. Written for the olds.ro plugin workshop (AMX-066).

Armor Loan
v1.0.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine ReHLDSNeeds ReAPI YesMetamod Metamod-R0 downloads5 KBUpdated 10 hours ago
Sign in to download
Pawn (AMX Mod X) · 334 lines
/*
 * Armor Loan (olds.ro workshop card AMX-066)
 *
 * Biohazard: a human offers some of their own armor to a nearby human; the
 * other player accepts or declines in a menu. Armor only moves between the
 * two: the combined total never changes.
 *
Show all 334 lines

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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.