OnPlayerEnterVehicle
This event is triggered when a player enters a vehicle.
C# Syntax
[ServerEvent(Event.PlayerEnterVehicle)]
Parameters
- player: parameter input should be in Player type
- vehicle: parameter input should be in Vehicle type
- seat: parameter input should be in sbyte type
Example
[ServerEvent(Event.PlayerEnterVehicle)]
public void OnPlayerEnterVehicle(Player player, Vehicle vehicle, sbyte seatID)
{
player.SendChatMessage($"You have entered {vehicle.DisplayName}.");
}