예제 #1
0
 private void onPlayerChat(string text, Events.CancelEventArgs cancel)
 {
     if (!isPlayerAuthorized || isPlayerInBrowser)
     {
         return;
     }
 }
예제 #2
0
 private void OnPlayerEnterCheckpoint(Checkpoint checkpoint, Events.CancelEventArgs cancel)
 {
     if (checkpoint == garbageCheckpoint && Player.LocalPlayer.Vehicle != null)
     {
         // Get the next checkpoint
         Events.CallRemote("garbageCheckpointEntered");
     }
 }
예제 #3
0
 private void OnPlayerEnterCheckpoint(Checkpoint checkpoint, Events.CancelEventArgs cancel)
 {
     if (checkpoint == fastFoodCheckpoint)
     {
         // Deliver the order
         Events.CallRemote("fastfoodCheckpointReached");
     }
 }
예제 #4
0
 private void OnPlayerStartEnterVehicle(Vehicle vehicle, int seatId, Events.CancelEventArgs cancel)
 {
     if (handcuffed && seatId == -1)
     {
         // Prevent the player from driving the vehicle
         cancel.Cancel = true;
     }
 }
예제 #5
0
 private void OnPlayerStartEnterVehicle(Vehicle vehicle, int seatId, Events.CancelEventArgs cancel)
 {
     if (handcuffed && seatId == Constants.VEHICLE_SEAT_DRIVER)
     {
         // Prevent the player from driving the vehicle
         cancel.Cancel = true;
     }
 }
예제 #6
0
        private void OnPlayerEnterCheckpoint(Checkpoint checkpoint, Events.CancelEventArgs cancel)
        {
            if (checkpoint == factionWarningCheckpoint)
            {
                // Destroy the checkpoint
                DeleteFactionWarningEvent(null);

                // Remove the faction warning
                Events.CallRemote("removeWarning");
            }
        }
예제 #7
0
        private void OnPlayerWeaponShotEvent(Vector3 targetPos, Player target, Events.CancelEventArgs cancel)
        {
            // Calculate the weapon the player is holding
            uint weaponHash = RAGE.Game.Weapon.GetSelectedPedWeapon(Player.LocalPlayer.Handle);

            // Get the bullets remaining
            int bullets = Player.LocalPlayer.GetAmmoInWeapon(weaponHash);

            // Update the weapon's bullet amount
            Events.CallRemote("updateWeaponBullets", bullets);
        }
예제 #8
0
        private void OnPlayerCommandEvent(string cmd, Events.CancelEventArgs cancel)
        {
            if (!Globals.playerLogged)
            {
                // Send the message to the player
                Events.CallRemote("playerNotLoggedCommand");

                // Cancel the command
                cancel.Cancel = true;
            }
        }
예제 #9
0
        private void OnPlayerEnterCheckpoint(Checkpoint checkpoint, Events.CancelEventArgs cancel)
        {
            if (checkpoint == vehicleLocationCheckpoint)
            {
                // Destroy the checkpoint on the map
                vehicleLocationCheckpoint.Destroy();
                vehicleLocationCheckpoint = null;

                // Destroy the blip on the map
                vehicleLocationBlip.Destroy();
                vehicleLocationBlip = null;
            }
        }
예제 #10
0
        private void OnPlayerEnterCheckpoint(Checkpoint checkpoint, Events.CancelEventArgs cancel)
        {
            if (checkpoint == carShopTestCheckpoint && Player.LocalPlayer.Vehicle != null)
            {
                // Destroy the checkpoint
                carShopTestCheckpoint.Destroy();
                carShopTestCheckpoint = null;

                // Delete the blip
                carShopTestBlip.Destroy();
                carShopTestBlip = null;

                // Deliver the test vehicle
                Events.CallRemote("deliverTestVehicle");
            }
        }
예제 #11
0
 /// <summary>
 /// Starts the wasted screen if enabled, which subscribes to the <see cref="Events.Tick"/>
 /// </summary>
 /// <param name="player"></param>
 /// <param name="reason"></param>
 /// <param name="killer"></param>
 /// <param name="cancel"></param>
 private void PlayerDied(RAGE.Elements.Player player, uint reason,
                         RAGE.Elements.Player killer, Events.CancelEventArgs cancel)
 {
     if (_wastedEnabled)
     {
         if (_wastedScaleformMsg != null)
         {
             this.timeStarted = RAGE.Game.Misc.GetGameTimer();
             PlayerHelper.WastedStart(_wastedTimeScale);
             Events.Tick -= OnTick;
             Events.Tick += OnTick;
         }
     }
     else
     {
         Events.CallRemote("WastedScreenFinished");
     }
 }
예제 #12
0
 /// <summary>
 /// Registers the <see cref="Events.Tick"/> to show money on the screen.
 /// </summary>
 /// <param name="cancel"></param>
 protected virtual void PlayerSpawned(Events.CancelEventArgs cancel)
 {
     Chat.Output("Player spawned");
     SetTickRender();
 }
예제 #13
0
 /// <summary>
 /// Unregisters the <see cref="Events.Tick"/> to show money
 /// </summary>
 /// <param name="player"></param>
 /// <param name="reason"></param>
 /// <param name="killer"></param>
 /// <param name="cancel"></param>
 protected virtual void PlayerDeath(RAGE.Elements.Player player, uint reason, RAGE.Elements.Player killer, Events.CancelEventArgs cancel)
 {
     Events.Tick -= Render;
 }
예제 #14
0
 private void OnPlayerChat(string text, Events.CancelEventArgs cancel)
 {
     Events.CallRemote("srv_TestEvent", text);
 }