Пример #1
0
 /// <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);
 }
Пример #2
0
        internal bool OnUnoccupiedVehicleUpdate(int vehicleid, int playerid, int passengerSeat, float newX,
            float newY, float newZ, float velX, float velY, float velZ)
        {
            var args = new UnoccupiedVehicleEventArgs(GtaPlayer.FindOrCreate(playerid), passengerSeat,
                new Vector3(newX, newY, newZ), new Vector3(velX, velY, velZ));
            OnUnoccupiedVehicleUpdated(GtaVehicle.FindOrCreate(vehicleid), args);

            return !args.PreventPropagation;
        }
Пример #3
0
 /// <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(BaseVehicle vehicle, UnoccupiedVehicleEventArgs e)
 {
     UnoccupiedVehicleUpdated?.Invoke(vehicle, e);
 }