public void OnPlayerEnterVehicle(Client player, GTANetworkAPI.Vehicle vehicle, sbyte seatId) { if (vehicle.GetVehicleEntity() is VehicleEntity vehicleEntity) { PlayerEnterVehicleEventArgs eventArgs = new PlayerEnterVehicleEventArgs(vehicleEntity, seatId); vehicleEntity.InvokePlayerEnterVehicle(player.GetAccountEntity().CharacterEntity, eventArgs); player.TriggerEvent(RemoteEvents.OnPlayerEnterVehicle, vehicle, seatId); } }
public void InvokePlayerEnterVehicle(CharacterEntity sender, PlayerEnterVehicleEventArgs eventArgs) { PlayerEnterVehicle?.Invoke(sender, eventArgs); }