Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Block Undo History

Featured Replies

  • Administrator

Builders can undo and redo their last twenty block actions (place, move, rotate, delete) with two binds. Mistakes on a big course no longer mean rebuilding by hand.

Block Undo History 1.0.0 (olds.ro)

A Blockmaker add-on. Builders can undo and redo their last twenty block actions (place, move, turn, delete) with two binds, so a mistake on a big course needs no rebuilding by hand.

Requirements

  • AMX Mod X 1.10.0.5490 or newer, fakemeta
  • the olds.ro Block Maker core with the block API in scripting/include/olds_blockmaker.inc (library "olds_blockmaker"): the natives olds_bm_create_block / _move_block / _delete_block / _is_block / _get_block and the forwards olds_bm_block_created / _moved / _deleted. The LIB-0046 Block Maker 1.0.0 does not have this API yet; the plugin does not load without it.

Install

  • Put include/olds_blockmaker.inc next to the compiler's includes, compile scripting/olds_bmundo.sma and copy olds_bmundo.amxx to addons/amxmodx/plugins/ (after the core in plugins.ini).
  • Copy data/lang/olds_bmundo.txt to addons/amxmodx/data/lang/.

Builders

  bind "[" olds_bm_undo      undo your last block action
  bind "]" olds_bm_redo      redo the last action you undid
  olds_bm_history            your two stacks, in the console

Admins olds_bm_history from the server console lists every builder's stacks.

How it works

  • Each create, move (or turn) and delete the core reports for a player is pushed onto that player's undo stack, 20 deep: the 21st action drops the oldest. A new action empties the redo stack.
  • Undo of a place deletes the block; undo of a delete creates it again through the core with the same type, origin, angles and size; undo of a move or turn puts back the old origin and angles. Redo does the action again. Every step goes through the core's natives, so its limits and turned-off types still apply (a refused step is dropped with a message).
  • Blocks carry an id of the add-on's own, so a block that was deleted and brought back is still the same block for every stack.
  • A builder's stacks hold only their own actions: nobody can undo another builder's work. If someone else removed the block a step needs, the step is dropped with a message.
  • Actions with no player (console, layout loads) are not recorded.
  • Stacks are cleared when the builder leaves and on map change.

No downloads.

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/include/olds_blockmaker.inc, addons/amxmodx/scripting/olds_bmundo.sma, test/bm_stub.sma

Idea: daemon · 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 (IDEA-F47A03552368622E).

Block Undo History
v1.0.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine HLDS, ReHLDSNeeds ReAPI NoMetamod Metamod-R0 downloads5.7 KBUpdated 4 hours ago
Sign in to download
Pawn (AMX Mod X) · 410 lines
/*
 * Block Undo History (olds.ro workshop card IDEA-F47A03552368622E)
 *
 * Blockmaker add-on: every builder can undo and redo their own last twenty block
 * actions (place, move, turn, delete) with two binds:
 *   bind "[" olds_bm_undo
 *   bind "]" olds_bm_redo
Show all 410 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.