Skip to content

Feature Request: Expose a C API to call Component / Pawn natives (for language bindings) #1

@joaoseidel

Description

@joaoseidel

Problem

The current C API only exposes core open.mp functions. There is no supported way to call natives provided by components (e.g. Streamer) or Pawn natives from external runtimes (Kotlin, in my case).

Component DLLs only export ComponentEntryPoint, so component natives are not callable via C FFI.

Impact

Language bindings cannot access:

  • Streamer natives
  • Custom Pawn natives
  • Natives from community components
  • This blocks full interoperability with the open.mp ecosystem.

Proposed Solution

Expose a native-calling API in the C API, similar to SA-MP (amx_FindNative, amx_Exec, sampgdk).

void* Component_QueryByName(const char* name);
int Component_CallNativeByName(
    void* component,
    const char* nativeName,
    const char* format,
    ...
);

or AMX-level access:

int AMX_FindNative(AMX* amx, const char* name);
int AMX_CallNative(AMX* amx, int index, cell* params);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions