v10networkscom / saltychat-redm

RedM implementation of Salty Chat (TeamSpeak 3 based Voice Plugin)
https://gaming.v10networks.com
GNU General Public License v3.0
10 stars 12 forks source link

How to change keybinding ? #6

Closed Gentil-Boo closed 3 years ago

Gentil-Boo commented 3 years ago

I've found this in VoiceManager.cs

`private async Task OnControlTick() { Game.DisableControlThisFrame(0, Control.OpenJournal); Game.DisableControlThisFrame(0, Control.PushToTalk); Game.DisableControlThisFrame(0, Control.OpenSatchelMenu);

        if (Game.Player.IsAlive)
        {
            if (Game.IsControlJustPressed(0, Control.OpenJournal))
            {
                this.ToggleVoiceRange();
            }

            if (this.PrimaryRadioChannel != null)
            {
                if (Game.IsControlJustPressed(0, Control.PushToTalk))
                    BaseScript.TriggerServerEvent(Event.SaltyChat_IsSending, this.PrimaryRadioChannel, true);
                else if (Game.IsControlJustReleased(0, Control.PushToTalk))
                    BaseScript.TriggerServerEvent(Event.SaltyChat_IsSending, this.PrimaryRadioChannel, false);
            }

            if (this.SecondaryRadioChannel != null)
            {
                if (Game.IsControlJustPressed(0, Control.OpenSatchelMenu))
                    BaseScript.TriggerServerEvent(Event.SaltyChat_IsSending, this.SecondaryRadioChannel, true);
                else if (Game.IsControlJustReleased(0, Control.OpenSatchelMenu))
                    BaseScript.TriggerServerEvent(Event.SaltyChat_IsSending, this.SecondaryRadioChannel, false);
            }
        }

        await Task.FromResult(0);
    }`

I tried to replace Control.OpenSatchelMenu by Control.SpecialAbility, but it's not working

Gentil-Boo commented 3 years ago

Just rebuild the solution after modify VoiceManager.cs