Fix: 'Native not found' After Installing ReAPI

August 13, 2025 Daemon666 8 min read 223 wyświetleń

You installed a plugin that uses ReAPI, and on map load AMX Mod X throws Native not found or the plugin shows as bad load in amxx plugins. ReAPI is not self-contained — it is a thin bridge that exposes ReHLDS and ReGameDLL hooks to Pawn, so a missing native almost always means a piece of that stack is absent or the wrong version, not that the plugin is broken. Here is how the layers fit and how to fix the gap.

1. Understand what ReAPI actually needs

ReAPI provides natives like RegisterHookChain, set_member, and rg_* functions. Those natives only exist if three things are present and compatible: ReHLDS (the engine), ReGameDLL_CS (the game logic that defines the hook chains), and the reapi AMX Mod X module that binds them. Remove or mismatch any one and the natives the plugin calls do not register, so AMXX reports them as not found. This is why the spec rule is firm: a plugin that #include <reapi> requires ReGameDLL, full stop.

2. Confirm the reapi module is loaded

The module must be listed and running. Check addons/amxmodx/configs/modules.ini contains the line:

reapi

Then verify at runtime from the server console:

amxx modules

The reapi module must read running. If it is missing from the list, the reapi_amxx.so (or .dll) file is not in addons/amxmodx/modules/; if it is listed but bad load, it failed to bind to the game — which points at the ReGameDLL layer below.

3. Verify ReGameDLL is actually the running game DLL

ReAPI's game-side natives come from ReGameDLL_CS. If your server still runs the stock cs.so / mp.dll, the reapi module loads but the rg_* natives never appear. Confirm ReGameDLL is installed as covered in the ReGameDLL install guide — the game library in cstrike/dlls/ must be the ReGameDLL build, and the server console at startup prints the ReGameDLL version banner. No banner means you are on stock game logic and every ReAPI game native will be missing.

4. Line up the versions

ReHLDS, ReGameDLL and the reapi module evolve together. A reapi module newer than your ReGameDLL can reference hook chains the older game DLL does not expose, and the specific native the plugin calls then fails to register. Update all three from the same release window rather than mixing a fresh reapi module onto a two-year-old ReGameDLL. If you cannot update the engine, use a reapi module contemporary with your ReGameDLL. This is the same compatibility discipline described in the ReGameDLL/ReHLDS incompatibility fix.

5. Load order in plugins.ini

The reapi module loads from modules.ini before plugins load, so module order is not the issue — but a plugin that depends on another reapi plugin's registered natives can load first and fail. If your failing plugin calls natives that a companion plugin registers with register_native, that provider must appear earlier in plugins.ini load order. For a plugin that only uses ReAPI's own natives, this does not apply and the cause is one of the layers above.

Troubleshooting

  • Native not found at load, reapi listed as running — ReGameDLL is not the active game DLL, so the game natives never registered. Install ReGameDLL (step 3).
  • reapi shows bad load in amxx modules — the module failed to bind to the game; version mismatch between reapi and ReGameDLL. Align versions (step 4).
  • Module file missing entirelyreapi_amxx.so is not in the modules folder, or reapi is absent from modules.ini. Add both.
  • Some rg_ natives work, one specific native does not — your ReGameDLL is older than the reapi module and lacks that hook. Update ReGameDLL.
  • Plugin using a companion's native fails — provider plugin loads after the consumer. Reorder plugins.ini.
  • Runs on ReHLDS box, breaks on another — the second box runs stock HLDS/game DLL. ReAPI cannot work there.

Verification

After correcting the stack, run amxx modules and confirm reapi reads running, then amxx plugins and confirm your plugin reads running rather than bad load. Trigger the plugin's actual behaviour in game — a hook chain it registers, such as a spawn or damage modification — and confirm it fires. If the module runs and the plugin loads but a hook still does nothing, the plugin's registration is fine and the ReGameDLL feature it hooks may be disabled in ReGameDLL's own game.cfg. When building your own ReAPI plugin, remember to set reapi_required and regamedll_required so the directory installs the dependencies alongside it — see the CSB Admin Menu for a maintained example that declares them correctly.

Współtwórcy: Daemon666 ✦
Udostępnij: