Mr.Free 2.0 ︻芫══一

Custom key mit InstaDoc?

6 posts in this topic

Ich benutze die Taste 7

Habe als Bedingung noch ein Schsden von > 50% eingefügt.

ExileClient_gui_hud_event_onKeyDown.sqf:

    case 0x08:
     {
        if ((damage player) > 0.5) then
        {
        call DeinSkript;    :D
        };
        _stopPropagation = true;
    };

Edited by CaptainChaos

Share this post


Link to post
Share on other sites
Advertisement
  1. Im falschen Sub und im Englischenabteil - Deutsche Sektion nutzen: http://www.exilemod.com/forum/81-german/
  2. HealMe ist doch keine Exilefunktion?!
  3. Wollte er es per Instadoc eingebunden haben
  4. //overwrite für ExileClient_gui_hud_event_onKeyUp.sqf erstellen
    case 0x08:
         {
           if !((damage player) isEqualTo 0) then 
    			{
    			"Exile_Item_Instadoc" call ExileClient_object_item_consume;
    			};
            _stopPropagation = true;
        };

     

  • Like 1

Share this post


Link to post
Share on other sites

A different version of the code to be merged in to ExileClient_gui_hud_event_onKeyDown.sqf code.  This version lets the player define which key (i.e. user custom key) to use for bandage, Vishpirin or Insta:

Spoiler

if (_keyCode in (actionKeys "User7")) exitWith
{
    if !(ExileClientIsHandcuffed || ExileIsPlayingRussianRoulette) then
    {
        if ((damage player) isEqualTo 0) then
        {
            infotitleandtext", Whoops!", "You're at 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 do not have any bandages."]] 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 "User8")) exitWith
{
    if !(ExileClientIsHandcuffed || ExileIsPlayingRussianRoulette) then
    {
        if ((damage player) isEqualTo 0) then
        {
            infotitleandtext", Whoops!", "You're at 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_Vishpirin" in (magazines player)) then
                {
                    infotitleandtext", Whoops!", "You don't have any Vishpirin."]] call ExileClient_gui_toaster_addTemplateToast;
                }
                else
                {
                    if ("Exile_Item_Vishpirin" in (magazines player)) then
                    {
                        exile_item_vishpirin"] 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 at 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 don't have any Instadocs."]] call ExileClient_gui_toaster_addTemplateToast;
                }
                else
                {
                    if ("Exile_Item_InstaDoc" in (magazines player)) then
                    {
                        exile_item_instadoc"] call ExileClient_object_item_consume;
                    };
                };
            };
        };
    };
    true
};

 

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.