Skip to main content

event

Attribute Macro event 

Source
#[event]
Expand description

Generates the handler wrapper that observes a Pawn callback (OnPlayerConnect, OnPlayerSpawn, …). Parses the callback arguments into the Rust types declared in the signature and invokes the marked method when the callback runs in the gamemode’s AMX. Register the handlers via initialize_plugin!(events: [...]).