AMXModX module providing APIs for ReHLDS, ReGameDLL, and Metamod plugins (e.g., ReUnion, ReVoice).
  • C++ 54.3%
  • C 26%
  • pawn 18.5%
  • Shell 0.5%
  • Batchfile 0.4%
  • Other 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nord1cWarr1or 4516d1efdf
docs: overhaul Pawn include documentation (#395)
* docs: overhaul include documentation across engine/cssdk/gamedll/reunion layers

Full read-only audit of include doc-comments against ReHLDS/ReGameDLL
sources, followed by approved fixes.

reapi_engine.inc / reapi_engine_const.inc (engine layer, 235 checks):
- add missing Return type for RH_GetEntityInit / RH_SV_CheckUserInfo
- fix factual errors: get_ucmd (usercmd handle, not entity),
  get_key_value_buffer (returns cell count), rh_get_client_connect_time
  (@error instead of soft 0), Is/ResetModifiedMessageData (MsgIndex ->
  MsgMsgId, "-1" argument rules), net_remote_address setter marked as
  not implemented (mutate the address via set_netadr)
- new SND_EMIT2_USE_ORIGIN define; ~20 typo/copy-paste doc fixes
  (lenght, metchan, mvar params, message_const.inc reference, etc.)

cssdk_const.inc (constant parity vs vendored cssdk + ReGameDLL/ReHLDS,
983 checks):
- renames: ITDB_* -> ITBD_*, SHIELDREN_* -> SHIELDGREN_* (match C++)
- DMG_EXPLOSION alias next to DMG_GRENADE (ReGameDLL name of the bit)
- new constants: BLOOD_COLOR_DARKRED, ITEM_FLAG_EXHAUST_SECONDARYAMMO/
  ITEM_FLAG_CUSTOM, PLAYER_PREVENT_DDUCK, DHF_*/DHM_* hint flags,
  ThrowDirection, sbar_data, PlayerIdShowHealth/PlayerIdField,
  WeaponInfiniteAmmoMode, AmmoType, RewardAccount, PaybackForBadThing
  (all verified against ReGameDLL)
- comment fixes: PFLAG_DUCKING, DEAD_RESPAWNABLE, WeaponState weapon
  list, FEV_RELIABLE tail, "light" section header

reapi_gamedll_const.inc: add missing Return type lines (RG_RoundEnd,
RG_HandleMenu_ChooseTeam, RG_CBasePlayer_TakeHealth,
RG_CBasePlayer_SetClientUserInfoName, RG_CBasePlayer_Observer_IsValidTarget
with ATYPE_CLASSPTR note, RG_CBasePlayer_HasRestrictItem), KickBack full
weapon list and up_max param name, m_pVIP/m_pVIPQueue relabeled to
class CBasePlayer *, m_iIgnoreGlobalChat typed IgnoreChatMsg.

reapi_reunion.inc: split constants into new reapi_reunion_const.inc
(client_auth_type, reu_authkey_kind, AuthIdType) and document new
natives (REU_GetAuthKeyKind, REU_SetConnectTime, REU_GetSerializedId).

natives_common.cpp: sync get_key_value_buffer docs with .inc, swap
mixed-up amx_Get/amx_SetBodygroup doc blocks
natives_misc.cpp: fix "independant ... with via" typo

* docs(cssdk_const): add Tier B & point constants verified against ReGameDLL/ReHLDS

Second batch of the cssdk_const expansion (CS-applicability filter
applied: HL-only relics like EF_NIGHTVISION/SNIPERLASER/FIBERCAMERA
are intentionally NOT added - neither fork ever sets those bits).

New constants:
- user-message payloads: BOMB_FLAG_*, STATUSICON_*, HUD_PRINT*
  (HUD_PRINTRADIO has no AMXX print_* analog), STATUS_NIGHTVISION_*,
  ITEM_STATUS_*
- ScreenFade flags: FFADE_IN/OUT/MODULATE/STAYOUT/LONGFADE
- CHAN_BOT (ReHLDS bot chatter channel)
- SCENARIO_BLOCK_* (mp_round_infinite flags "a".."k")
- menus: ChooseTeamMenuSlot, VGUIMenuSlot, BuyItemMenuSlot
- weapon bitfield masks: WEAPON_SUIT, WEAPON_ALLWEAPONS
- view cone: VIEW_FIELD_FULL/WIDE/NARROW/ULTRA_NARROW
- misc: IN_ACTIVE composite, NUM_BLENDING, ANIM_SWIM_1/2,
  ANIM_FIRST_DEATH_SEQUENCE, WEAPON_ACTIVITY_VOLUME, DEFAULT_FOV,
  CS_KILLS_FOR_DOMINATION, KNIFE_BODYHIT/WALLHIT_VOLUME
- point additions: MAX_AMMO_SLOTS, MAX_ITEMS, NUM_HITGROUPS,
  ITBD_END, SF_GAMECOUNTSET_FIREONCE, SF_GAME_PZONE_ONLY_ALIVE,
  SF_PLAYEREQUIP_REMOVEWEAPONS, SF_GUNTARGET_START_ON,
  SF_SPARK_TOOGLE/IF_OFF ("TOOGLE" preserved from C++)

All values verified against ReGameDLL/ReHLDS headers; no name
collisions with amxmodx/core or reapi includes (word-boundary sweep).

* docs(cssdk_const): export large ReGameDLL weapon/reward enums

Expansion batch: port the big constant enums that plugins could not
use before (values verified 1:1 against ReGameDLL weapontype.h,
gamerules.h, weapons.h):

- AutoBuyClassType (15 autobuy bits)
- ItemCostType / AmmoCostType / WeaponCostType (item, ammo and
  weapon default prices; AmmoCostType grenade entries reference
  ItemCostType values, as in C++)
- ClipGiveDefault (28, KNIFE entry kept commented as in C++)
- ClipSizeType (24 clip sizes)
- WeightWeapon (29 weights)
- MaxAmmoType (10 base + 4 ReGameDLL custom grenade/C4 caps)
- SATCHELCODE (grenade satchel use codes)
- DefuserAllocation (mp_defuser_allocation modes)

Word-boundary collision sweep vs amxmodx core and reapi includes:
clean.

* docs(cssdk_const): add GROUP_OP_AND/GROUP_OP_NAND

Port the util.h group operation codes (placed next to the
VIEW_FIELD_* block, mirroring source order). Values verified against
ReGameDLL regamedll/dlls/util.h:36-37; resurrected from an old local
commit (65e855d). No name collisions with amxmodx core or reapi
includes (word-boundary sweep).

* docs(cssdk_const): drop SATCHELCODE, relocate KNIFE_*_VOLUME

- remove SATCHELCODE enum: HL satchel-charge relic, UseSatchelCharges
  is NOXREF and never called in CS paths (violates the
  CS-applicability filter)
- move KNIFE_BODYHIT_VOLUME/KNIFE_WALLHIT_VOLUME out of the
  m_iWeaponFlash block into the m_iWeaponVolume block where they
  belong: both are m_iWeaponVolume values set by wpn_knife.cpp
  (body hit = 128, wall hit = int(flVol * 512))

* docs: correct reapi.inc hookchain native docs and reapi_rechecker.inc contract

- HC_BYPASS: document void-only behavior (on returning hookchains it acts like HC_CONTINUE)
- GetHookChainReturn: maxlen is required for ATYPE_STRING, not optional; clarify @return
- SetHookChainArg: remove phantom maxlen param, add missing @param type, clarify post behavior (later post forwards still see the changed argument)
- add missing @return blocks: DisableHookChain, SetHookChainReturn (+@error: strict AType check, ATYPE_TRACE unsupported), get_viewent
- reapi_rechecker.inc: declare QueryFileHook tag enum (INVALID_QUERYFILE_HOOK), document hash=-1 semantics (RES_TYPE_EXISTS with -1 becomes RES_TYPE_HASH_ANY), fix ResourceType comment grammar

* docs: note VTC_PlaySound path and format requirements

Documents existing VTC behavior: soundFilePath is relative to the game directory and must be a valid PCM WAV file (8 or 16 bit). The broadcast receiver note and the block natives documentation live in the module PR (feat/vtc-api31-block-natives).

* docs(cssdk_const): add SBAR_TARGETTYPE_NONE

Mirrors the implicit zeroed sbar state (no target under the crosshair) so Pawn plugins can compare the target type against a named constant instead of a magic 0.

Note: upstream ReGameDLL (player.h) defines only SBAR_TARGETTYPE_TEAMMATE/ENEMY/HOSTAGE; the zero state is unnamed there, so 0 is taken from the zero-initialized newSBarState behavior.
2026-10-13 17:31:33 +03:00
.github/workflows ci: fix Linux build after Debian 11 EOL (#398) 2026-09-17 11:29:36 +03:00
msvc Add workflows/build.yml (Migrate to Github CI) 2021-04-24 00:25:20 +07:00
reapi docs: overhaul Pawn include documentation (#395) 2026-10-13 17:31:33 +03:00
.gitattributes Add .gitattributes 2021-04-24 00:25:25 +07:00
.gitignore Remove gradle build system 2021-04-18 17:55:43 +07:00
build.sh Add workflows/build.yml (Migrate to Github CI) 2021-04-24 00:25:20 +07:00
CHANGELOG.md fixed date of latest release 2024-11-15 17:42:05 +03:00
CMakeLists.txt Add workflows/build.yml (Migrate to Github CI) 2021-04-24 00:25:20 +07:00
LICENSE Initial commit 2016-03-30 17:12:54 +06:00
README.md added changelog + updated readme 2024-11-15 17:39:05 +03:00
version_script.lds Enable RTTI 2020-12-16 19:37:01 +07:00

ReAPI Download Downloads Percentage of issues still open License: GPL v3

AMX Mod X module, using API regamedll & rehlds

Build instructions

Checking requirements

There are several software requirements for building ReAPI:

Windows

Visual Studio 2015 (C++14 standard) and later

Linux

git >= 1.8.5
cmake >= 3.10
GCC >= 4.9.2 (Optional)
ICC >= 15.0.1 20141023 (Optional)
LLVM (Clang) >= 6.0 (Optional)

Building

Windows

Use Visual Studio to build, open msvc/ReAPI.sln and just select from the solution configurations list Release or Debug

Linux

  • Optional options using build.sh --compiler=[gcc] --jobs=[N] -D[option]=[ON or OFF] (without square brackets)
-c=|--compiler=[icc|gcc|clang]  - Select preferred C/C++ compiler to build
-j=|--jobs=[N]                  - Specifies the number of jobs (commands) to run simultaneously (For faster building)

Definitions (-D)
DEBUG                           - Enables debugging mode
USE_STATIC_LIBSTDC              - Enables static linking library libstdc++
  • ICC
    ./build.sh --compiler=intel
  • LLVM (Clang)
    ./build.sh --compiler=clang
  • GCC
    ./build.sh --compiler=gcc
Checking build environment (Debian / Ubuntu)
Click to expand
  • Installing required packages
    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install -y gcc-multilib g++-multilib
    sudo apt-get install -y build-essential
    sudo apt-get install -y libc6-dev libc6-dev-i386
    
  • Select the preferred C/C++ Compiler installation
    1) sudo apt-get install -y gcc g++
    2) sudo apt-get install -y clang
    

How can I help the project?

Just install it on your game server and report problems you faced.
Merge requests are also welcome :shipit: