Exemplo n.º 1
0
        public void OnSetRadioSpeaker(GTANetworkAPI.Client player, string toggleString)
        {
            bool toggle = String.Equals(toggleString, "true", StringComparison.OrdinalIgnoreCase);

            VoiceManager.SetRadioSpeaker(player, toggle);

            player.SendChatMessage("Speaker", $"The speaker is now {(toggle ? "on" : "off")}.");
        }
Exemplo n.º 2
0
        private void SetPlayerRadioSpeaker(int netId, bool toggle)
        {
            Player player = this.Players[netId];

            if (!VoiceManager._voiceClients.TryGetValue(player, out VoiceClient voiceClient))
            {
                return;
            }

            VoiceManager.SetRadioSpeaker(voiceClient, toggle);
        }
Exemplo n.º 3
0
        private void OnSetRadioSpeaker(Player player, string[] args)
        {
            if (args.Length < 1)
            {
                player.SendChatMessage("Usage", "/speaker {true/false}");
                return;
            }

            bool toggle = String.Equals(args[0], "true", StringComparison.OrdinalIgnoreCase);

            VoiceManager.SetRadioSpeaker(player, toggle);

            player.SendChatMessage("Speaker", $"The speaker is now {(toggle ? "on" : "off")}.");
        }
Exemplo n.º 4
0
        private void SetPlayerRadioSpeaker(int netId, bool toggle)
        {
            Player player = this.Players[netId];

            VoiceManager.SetRadioSpeaker(player, toggle);
        }