/// <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); }
internal bool OnVehicleMod(int playerid, int vehicleid, int componentid) { var args = new VehicleModEventArgs(GtaPlayer.FindOrCreate(playerid), componentid); OnVehicleMod(GtaVehicle.FindOrCreate(vehicleid), args); return !args.PreventPropagation; }
/// <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(BaseVehicle vehicle, VehicleModEventArgs e) { VehicleMod?.Invoke(vehicle, e); }