Fire
This event is called when a player causes a fire. Return false to remove the fire before it is seen from other players.
Parameter | Description |
---|---|
player | The player syncing the fire |
fireInfos | The infos about the fire |
Normal event handler
Alt.OnFire += (player, fireInfos) => {
// ...
return true
}
Attribute event handler
Warning
Attribute event handlers only work in Scripts, or after executing Alt.RegisterEvents on a class instance.
For more info see: Create script
public class MyScript : IScript
{
[ScriptEvent(ScriptEventType.Fire)]
public bool OnFire(IPlayer player, FireInfo[] fireInfos)
{
// ...
return true
}
}