PlayerEnteringVehicle
Tip
This event is available on server-side onlyt.
This event is called when a player starts entering vehicle.
Parameter | Description |
---|---|
vehicle | The vehicle player entering |
player | The player who changed the seat |
seat | The seat where the player entered |
Normal event handler
Alt.OnPlayerEnteringVehicle += (vehicle, player, seat) => {
// ...
}
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.PlayerEnteringVehicle)]
public void OnPlayerEnteringVehicle(IVehicle vehicle, IPlayer player, uint seat)
{
// ...
}
}