/// <summary> /// Raises the <see cref="VehicleStreamOut" /> event. /// </summary> /// <param name="vehicle">The vehicle triggering the event.</param> /// <param name="e">An <see cref="PlayerVehicleEventArgs" /> that contains the event data. </param> protected virtual void OnVehicleStreamOut(GtaVehicle vehicle, PlayerEventArgs e) { if (VehicleStreamOut != null) VehicleStreamOut(vehicle, e); }
/// <summary> /// Initializes a new instance of the <see cref="PlayerVehicleEventArgs" /> class. /// </summary> /// <param name="player">The player.</param> /// <param name="vehicle">The vehicle.</param> public PlayerVehicleEventArgs(GtaPlayer player, GtaVehicle vehicle) : base(player) { Vehicle = vehicle; }
/// <summary> /// Raises the <see cref="VehicleSirenStateChange" /> event. /// </summary> /// <param name="vehicle">The vehicle.</param> /// <param name="e">The <see cref="SirenStateEventArgs" /> instance containing the event data.</param> protected void OnVehicleSirenStateChange(GtaVehicle vehicle, SirenStateEventArgs e) { if (VehicleSirenStateChange != null) VehicleSirenStateChange(vehicle, e); }
/// <summary> /// Raises the <see cref="VehicleSpawned" /> event. /// </summary> /// <param name="vehicle">The vehicle triggering the event.</param> /// <param name="e">An <see cref="EventArgs" /> that contains the event data. </param> protected virtual void OnVehicleSpawned(GtaVehicle vehicle, EventArgs e) { if (VehicleSpawned != null) VehicleSpawned(vehicle, e); }
/// <summary> /// Raises the <see cref="VehiclePaintjobApplied" /> event. /// </summary> /// <param name="vehicle">The vehicle triggering the event.</param> /// <param name="e">An <see cref="VehiclePaintjobEventArgs" /> that contains the event data. </param> protected virtual void OnVehiclePaintjobApplied(GtaVehicle vehicle, VehiclePaintjobEventArgs e) { if (VehiclePaintjobApplied != null) VehiclePaintjobApplied(vehicle, e); }
/// <summary> /// Raises the <see cref="VehicleResprayed" /> event. /// </summary> /// <param name="vehicle">The vehicle triggering the event.</param> /// <param name="e">An <see cref="VehicleResprayedEventArgs" /> that contains the event data. </param> protected virtual void OnVehicleResprayed(GtaVehicle vehicle, VehicleResprayedEventArgs e) { if (VehicleResprayed != null) VehicleResprayed(vehicle, e); }
/// <summary> /// Raises the <see cref="VehicleDied" /> event. /// </summary> /// <param name="vehicle">The vehicle triggering the event.</param> /// <param name="e">An <see cref="PlayerEventArgs" /> that contains the event data. </param> protected virtual void OnVehicleDied(GtaVehicle vehicle, PlayerEventArgs e) { if (VehicleDied != null) VehicleDied(vehicle, e); }
/// <summary> /// Raises the <see cref="VehicleMod" /> event. /// </summary> /// <param name="vehicle">The vehicle triggering the event.</param> /// <param name="e">An <see cref="VehicleModEventArgs" /> that contains the event data. </param> protected virtual void OnVehicleMod(GtaVehicle vehicle, VehicleModEventArgs e) { if (VehicleMod != null) VehicleMod(vehicle, e); }
/// <summary> /// Raises the <see cref="VehicleDamageStatusUpdated" /> event. /// </summary> /// <param name="vehicle">The vehicle triggering the event.</param> /// <param name="e">An <see cref="PlayerVehicleEventArgs" /> that contains the event data. </param> protected virtual void OnVehicleDamageStatusUpdated(GtaVehicle vehicle, PlayerEventArgs e) { if (VehicleDamageStatusUpdated != null) VehicleDamageStatusUpdated(vehicle, e); }
/// <summary> /// Raises the <see cref="UnoccupiedVehicleUpdated" /> event. /// </summary> /// <param name="vehicle">The vehicle triggering the event.</param> /// <param name="e">An <see cref="UnoccupiedVehicleEventArgs" /> that contains the event data. </param> protected virtual void OnUnoccupiedVehicleUpdated(GtaVehicle vehicle, UnoccupiedVehicleEventArgs e) { if (UnoccupiedVehicleUpdated != null) UnoccupiedVehicleUpdated(vehicle, e); }
/// <summary> /// Raises the <see cref="TrailerUpdate" /> event. /// </summary> /// <param name="trailer">The trailer triggering the event.</param> /// <param name="e">An <see cref="PlayerVehicleEventArgs" /> that contains the event data. </param> protected virtual void OnTrailerUpdate(GtaVehicle trailer, TrailerEventArgs e) { if (TrailerUpdate != null) TrailerUpdate(trailer, e); }
/// <summary> /// Registers types this VehicleController requires the system to use. /// </summary> public virtual void RegisterTypes() { GtaVehicle.Register <GtaVehicle>(); }
public void Start(GameMode gameMode) { GtaVehicle veh = GtaVehicle.Create(VehicleModelType.Burrito, new Vector3(5), 0, -1, -1, -1, true); Console.WriteLine("Vehiclesize of {1}: {0}", veh.ModelInfo[VehicleModelInfoType.Size], veh.ModelInfo.Name); }