Expand description
Vtables for objects managed by the Open Multiplayer server.
The vtable indices and signatures were derived from the public specification of the Open Multiplayer SDK (https://github.com/openmultiplayer/open.mp-sdk). No SDK code was copied.
Unlike component.rs (where WE implement the vtable), here we define
vtables for objects created by the SERVER so we can call methods on
them from Rust.
§Indices per ABI
Itanium ABI — two destructor slots (D1 + D0) interleaved after the virtuals of each base class, in declaration order.
MSVC ABI — a single destructor (scalar deleting) at the end of the
virtuals of the class that declared it (e.g. ~IExtensible at slot [4],
after removeExtension).
The practical difference is that on MSVC the vtable is 1 slot smaller per destructor (no separate D0 slot), which shifts all subsequent methods.
Structs§
- IEvent
Dispatcher Pawn - Opaque handle for the server’s
IEventDispatcher<PawnEventHandler>*. - IPawn
Script - Opaque handle for the server’s
IPawnScript*. - Pawn
Component - Typed wrapper for the Open Multiplayer server’s
IPawnComponent. - Server
Component - Opaque handle for the
IComponent*returned by queryComponent. - Server
Component List - Opaque handle for the server’s
IComponentList*. - Server
Pawn Component - Opaque handle for the server’s
IPawnComponent*.
Constants§
- NUM_
AMX_ FUNCS - Number of AMX functions exported by
IPawnComponent(NUM_AMX_FUNCSin the SDK). - PAWN_
COMPONENT_ UID - UID of the Open Multiplayer Pawn component (
PawnComponent_UIDin the SDK).
Functions§
- add_
pawn_ ⚠event_ handler - Registers a Pawn event handler in the dispatcher.
- get_
amx_ ⚠from_ script - Extracts the
AMX*pointer from anIPawnScript*. - get_
amx_ ⚠functions - Gets the pointer to the AMX function table from the
IPawnComponent. - get_
pawn_ ⚠event_ dispatcher - Gets the Pawn event dispatcher from the
IPawnComponent. - query_
component ⚠ - Queries a component by UID in the list provided by the server.
- remove_
pawn_ ⚠event_ handler - Removes a Pawn event handler from the dispatcher.
Type Aliases§
- AmxFunction
Table - Table of 52 AMX function pointers (
StaticArray<void*, NUM_AMX_FUNCS>).