events
Listener Types
| Type | Callback |
|---|---|
on_player_join | function(name: string, index: int, rid: int): void |
on_player_leave | function(name: stirng, index: int, rid: int): void |
on_player_spawn | function(name: string, index: int): void |
on_entity_damaged | function(victim_entity: int, damager_entity: int, weapon_hash: int, ammo_hash: int, damage: float, victim_dead: bool, was_suicide: bool): void |
on_entity_revived | function(victim_entity: int, reviver_entity: int): void |
on_script_event | function(...): void |
Methods
has_listener
Returns true if this event type has a listener registered with the provided name
add_listener
Returns true if the listener was successfully registered
remove_listener
Returns true if the listener was successfully found and removed