F_Society

Instadoc / vishpirin / bandage hotkey

Meds hotkey   13 members have voted

  1. 1. Would you like a hotkey implemented?

    • Yes
      10
    • No
      3

Please sign in or register to vote in this poll.

6 posts in this topic

I don't want to open my inventory to heal. It would be nice to just press a hotkey and if you have any meds on you it will automatically use 1 without opening the inventory

Share this post


Link to post
Share on other sites
Advertisement
18 minutes ago, F_Society said:

I don't want to open my inventory to heal. It would be nice to just press a hotkey and if you have any meds on you it will automatically use 1 without opening the inventory

 

Spoiler

if (_keyCode in (actionKeys "User5")) exitWith
{
    if !(ExileClientIsHandcuffed || ExileIsPlayingRussianRoulette) then
    {
        if ((damage player) isEqualTo 0) then
        {
            ["InfoTitleAndText", ["Whoops", "You're full health!"]] call ExileClient_gui_toaster_addTemplateToast;
        }
        else
        {
            if !(alive player) then
            {
                ["InfoTitleAndText", ["Whoops", "You're already dead!"]] call ExileClient_gui_toaster_addTemplateToast;
            }
            else
            {
                if !("Exile_Item_Bandage" in (magazines player)) then
                {
                    ["InfoTitleAndText", ["Whoops", "You have no bandages left!"]] call ExileClient_gui_toaster_addTemplateToast;
                }
                else
                {
                    if ("Exile_Item_Bandage" in (magazines player)) then
                    {
                        ["Exile_Item_Bandage"] call ExileClient_object_item_consume;
                    };
                };
            };
        };
    };

  true

};

if (_keyCode in (actionKeys "User9")) exitWith
{
    if !(ExileClientIsHandcuffed || ExileIsPlayingRussianRoulette) then
    {
        if ((damage player) isEqualTo 0) then
        {
            ["InfoTitleAndText", ["Whoops", "You're full health!"]] call ExileClient_gui_toaster_addTemplateToast;
        }
        else
        {
            if !(alive player) then
            {
                ["InfoTitleAndText", ["Whoops", "You're already dead!"]] call ExileClient_gui_toaster_addTemplateToast;
            }
            else
            {
                if !("Exile_Item_InstaDoc" in (magazines player)) then
                {
                    ["InfoTitleAndText", ["Whoops", "You'd lost your InstaDoc somewhere!"]] call ExileClient_gui_toaster_addTemplateToast;
                }
                else
                {
                    if ("Exile_Item_InstaDoc" in (magazines player)) then
                    {
                        ["Exile_Item_InstaDoc"] call ExileClient_object_item_consume;
                    };
                };
            };
        };
    };
    true
};

 

Add them up top some where in ExileClient_gui_hud_event_onKeyUp.sqf , add to your customcode section in config.cpp and assign your custom keys to them, custom 5 for bandage and custom 9 for instadoc. Done

Edited by Pattoh

Share this post


Link to post
Share on other sites
On ‎20‎/‎12‎/‎2017 at 9:20 AM, GolovaRaoul said:

Or disable damage at all so you don't need that instadoc

no a hotkey to make all my shiny AI instantly kill all the players by chasing them round the map with chainsaws! surely that's possible :)

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.