Example #1
0
 /// <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);
 }
Example #2
0
        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;
        }
Example #3
0
 /// <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);
 }