Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 public void InvokePlayerEnterVehicle(CharacterEntity sender, PlayerEnterVehicleEventArgs eventArgs)
 {
     PlayerEnterVehicle?.Invoke(sender, eventArgs);
 }