Ejemplo n.º 1
0
        public void Runtick()
        {
            if (((currentSiren == null) || currentSiren._vehicle != Game.Player.Character.CurrentVehicle))
            {
                SetCurrentSiren(Game.Player.Character.CurrentVehicle);
            }

            currentSiren.ticker();
        }
Ejemplo n.º 2
0
        internal void Runtick()
        {
            var localPlayer = Game.Player;

            if (localPlayer.Character.IsInVehicle() &&
                localPlayer.Character.IsSittingInVehicle() &&
                localPlayer.Character.CurrentVehicle.IsEls() &&
                (
                    localPlayer.Character.CurrentVehicle.GetPedOnSeat(VehicleSeat.Driver) == localPlayer.Character ||
                    localPlayer.Character.CurrentVehicle.GetPedOnSeat(VehicleSeat.Passenger) == localPlayer.Character
                )
                )
            {
                if (_currentSiren == null || _currentSiren._vehicle != Game.Player.Character.CurrentVehicle)
                {
                    var vehicle = Game.Player.Character.CurrentVehicle;
                    AddVehicleIfNotRegistered(vehicle);
                    _currentSiren = _sirens.Find(siren => siren._vehicle.Handle == vehicle.Handle);
                }
                _currentSiren.ticker();
            }
        }