Expand description
API the Rust plugin uses: trait SampPlugin (lifecycle) + global
functions to enable features (enable_tick, logger, omp_query).
Structs§
- Tick
Config - Tells the SDK how often
SampPlugin::on_tickshould fire on each server. - Tick
Context - Per-call context delivered to
SampPlugin::on_tick.
Enums§
- Tick
Source - Origin of the current
SampPlugin::on_tickinvocation.
Traits§
- Samp
Plugin - Plugin lifecycle. All methods are optional — the trait provides empty implementations so the plugin only overrides the relevant ones.
Functions§
- disable_
debug_ hook - Removes the SDK debug hook previously installed by
enable_debug_hookonamx, soSampPlugin::on_debug_breakstops firing for it. - enable_
debug_ hook - Installs the SDK’s debug hook on
amx, routing every executed line intoSampPlugin::on_debug_break. Call fromSampPlugin::on_amx_loadfor each AMX you want to debug (typically the gamemode). - enable_
tick - Enables
SampPlugin::on_tickwith default settings: tick on both servers, 5 ms interval on Open Multiplayer. - enable_
tick_ with - Enables
SampPlugin::on_tickwith an explicitTickConfig. - logger
- Returns a
fern::Dispatchalready chained into the server’s log system, disabling the SDK’s default routing. - omp_
core - Returns the Open Multiplayer server’s
ICore*pointer received inon_load. - omp_
query - Looks up an Open Multiplayer component via its typed wrapper.
- omp_
query_ component - Looks up an Open Multiplayer component by UID in the list received in
on_init.