Skip to content

Implement new meta natives for module development: MF_GetScriptInfo, MF_GetAmxVersion, MF_SetFailState#1138

Open
DarthMan wants to merge 2 commits intoalliedmodders:masterfrom
DarthMan:new-features
Open

Implement new meta natives for module development: MF_GetScriptInfo, MF_GetAmxVersion, MF_SetFailState#1138
DarthMan wants to merge 2 commits intoalliedmodders:masterfrom
DarthMan:new-features

Conversation

@DarthMan
Copy link
Copy Markdown

@DarthMan DarthMan commented Dec 31, 2025

Description:

This PR introduces three new meta natives intended to expose more internal data and control to C++ module developers. These additions allow modules to query plugin metadata, check the core AMXX version, and handle plugin failures more discreetly.

Changes:

  • MF_GetScriptInfo: Allows a module to retrieve the Title, Author, and Version of a running plugin by providing the AMX* pointer. Arguments can be passed as nullptr if specific fields are not needed. This native was added as currently there is no way to get a plugin name, version and author when writing a module, unlike is the case with SourceMod.

  • MF_GetAmxVersion: Returns the current AMX Mod X version string.

  • MF_SetFailState: Sets a plugin into a failed state (similar to the Pawn set_fail_state native). Key difference: This native does not automatically print or log the error message, allowing the module developer to handle logging customly or silently if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant