Beispiel #1
0
 /// <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);
 }
Beispiel #2
0
        internal bool OnTrailerUpdate(int playerId, int vehicleId)
        {
            var args = new TrailerEventArgs(GtaPlayer.FindOrCreate(playerId));
            OnTrailerUpdate(GtaVehicle.FindOrCreate(vehicleId), args);

            return !args.PreventPropagation;
        }
Beispiel #3
0
 /// <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(BaseVehicle trailer, TrailerEventArgs e)
 {
     TrailerUpdate?.Invoke(trailer, e);
 }