Jump to content
Daniel Stewart

[Tutorial] 5.0 ATM Menu + Deposit-All Button

Recommended Posts

I have looked around and I found 1 tutorial on this and it was not clear what to do so I'm making this :)

----------------------------------------------------------------------------------------------------

Difficulty: Easy Steps. Simply Copy & Paste

Author: Daniel Stewart

----------------------------------------------------------------------------------------------------

Screenshot:

15b246abd1a638308f0187a5d739b796.png.b3ac4d56d10b58287d6c095d53c52624.png

Step 1. Copy & Paste into Alits_Life.Alits\dialog\bank.hpp

Spoiler

class Life_atm_management {
    idd = 2700;
  name= "life_atm_menu";
    movingEnable = 0;
    enableSimulation = 1;

  class ControlsBackground
    {
        class Life_RscTitleBackground : Life_RscText
        {
            idc = -1;
            x = safeZoneX + safeZoneW * 0.3625;
            y = safeZoneY + safeZoneH * 0.38425926;
            w = safeZoneW * 0.29114584;
            h = safeZoneH * 0.02222223;
            colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};

        };
        class MainBackground : Life_RscText
        {
            idc = -1;
            x = safeZoneX + safeZoneW * 0.361875;
            y = safeZoneY + safeZoneH * 0.41;
            w = safeZoneW * 0.29125;
            h = safeZoneH * 0.16333334;
            colorBackground[] = {0,0,0,0.7};

        };

    };
    class Controls
    {
        class CashTitle : Life_RscStructuredText
        {
            idc = 2701;
            x = safeZoneX + safeZoneW * 0.36666667;
            y = safeZoneY + safeZoneH * 0.4175926;
            w = safeZoneW * 0.17447917;
            h = safeZoneH * 0.04907408;
            text = "";
            colorBackground[] = {1,1,1,0};
            class Attributes
            {
                font = "RobotoCondensed";
                color = "#ffffff";
                align = "left";

            };

        };
        class Title : Life_RscTitle
        {
            idc = -1;
            x = safeZoneX + safeZoneW * 0.3640625;
            y = safeZoneY + safeZoneH * 0.38240741;
            w = safeZoneW * 0.28697917;
            h = safeZoneH * 0.02222223;
            text = "$STR_ATM_Title";
            colorBackground[] = {0,0,0,0};

        };
        class WithdrawButton : Life_RscButtonMenu
        {
            idc = -1;
            x = safeZoneX + safeZoneW * 0.365625;
            y = safeZoneY + safeZoneH * 0.54351852;
            w = safeZoneW * 0.06197917;
            h = safeZoneH * 0.02222223;
            text = "$STR_ATM_Withdraw";
            colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
            onButtonClick = "[] call life_fnc_bankWithdraw";
            class HitZone
            {
                top = 0.0;
                right = 0.0;
                bottom = 0.0;
                left = 0.0;

            };
            class ShortcutPos
            {
                top = 0.005;
                left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
                w = 0.0225;
                h = 0.03;

            };
            class TextPos
            {
                top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
                right = 0.005;
                bottom = 0.0;
                left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

            };

        };
        class DepositButton : Life_RscButtonMenu
        {
            idc = -1;
            x = safeZoneX + safeZoneW * 0.4296875;
            y = safeZoneY + safeZoneH * 0.54351852;
            w = safeZoneW * 0.06197917;
            h = safeZoneH * 0.02222223;
            text = "$STR_ATM_Deposit";
            colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
            onButtonClick = "[0] call life_fnc_bankDeposit";
            class HitZone
            {
                top = 0.0;
                right = 0.0;
                bottom = 0.0;
                left = 0.0;

            };
            class ShortcutPos
            {
                top = 0.005;
                left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
                w = 0.0225;
                h = 0.03;

            };
            class TextPos
            {
                top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
                right = 0.005;
                bottom = 0.0;
                left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

            };

        };
        class moneyEdit : Life_RscEdit
        {
            idc = 2702;
            x = safeZoneX + safeZoneW * 0.36822917;
            y = safeZoneY + safeZoneH * 0.50370371;
            w = safeZoneW * 0.27760417;
            h = safeZoneH * 0.01851852;
            text = "1";
            colorSelection[] = {1,0,0,1};
            sizeEx = 0.030;

        };
        class PlayerList : Life_RscCombo
        {
            idc = 2703;
            x = safeZoneX + safeZoneW * 0.36822917;
            y = safeZoneY + safeZoneH * 0.47777778;
            w = safeZoneW * 0.27760417;
            h = safeZoneH * 0.01666667;
            class ComboScrollBar
            {
                color[] = {1,1,1,1};
                thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
                arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
                arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
                border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";

            };

        };
        class TransferButton : Life_RscButtonMenu
        {
            idc = -1;
            x = safeZoneX + safeZoneW * 0.55833334;
            y = safeZoneY + safeZoneH * 0.54351852;
            w = safeZoneW * 0.06197917;
            h = safeZoneH * 0.02222223;
            text = "$STR_ATM_Transfer";
            colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
            onButtonClick = "[] call life_fnc_bankTransfer";
            class HitZone
            {
                top = 0.0;
                right = 0.0;
                bottom = 0.0;
                left = 0.0;

            };
            class ShortcutPos
            {
                top = 0.005;
                left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
                w = 0.0225;
                h = 0.03;

            };
            class TextPos
            {
                top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
                right = 0.005;
                bottom = 0.0;
                left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

            };

        };
        class CloseButtonKey : Life_RscButtonMenu
        {
            idc = -1;
            x = safeZoneX + safeZoneW * 0.36197917;
            y = safeZoneY + safeZoneH * 0.57592593;
            w = safeZoneW * 0.06458334;
            h = safeZoneH * 0.02222223;
            text = "$STR_Global_Close";
            onButtonClick = "closeDialog 0;";
            class HitZone
            {
                top = 0.0;
                right = 0.0;
                bottom = 0.0;
                left = 0.0;

            };
            class ShortcutPos
            {
                top = 0.005;
                left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
                w = 0.0225;
                h = 0.03;

            };
            class TextPos
            {
                top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
                right = 0.005;
                bottom = 0.0;
                left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

            };

        };
        class DepositAllButton : Life_RscButtonMenu
        {
            idc = -1;
            x = safeZoneX + safeZoneW * 0.49375;
            y = safeZoneY + safeZoneH * 0.54351852;
            w = safeZoneW * 0.06197917;
            h = safeZoneH * 0.02222223;
            text = "$STR_ATM_Deposit_All";
            colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
            onButtonClick = "[1] call life_fnc_bankDeposit";
            class HitZone
            {
                top = 0.0;
                right = 0.0;
                bottom = 0.0;
                left = 0.0;

            };
            class ShortcutPos
            {
                top = 0.005;
                left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
                w = 0.0225;
                h = 0.03;

            };
            class TextPos
            {
                top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
                right = 0.005;
                bottom = 0.0;
                left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

            };

        };

    };

};

  Step 2. Find

CONTROL(2700,2701) ctrlSetStructuredText parseText format ["<img size='1.7' image='icons\ico_bank.paa'/> $%1<br/><img size='1.6' image='icons\ico_money.paa'/> $%2",[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];

in Altis_Life.Altis\core\shops\fn_atmMenu.sqf replace with

CONTROL(2700,2701) ctrlSetStructuredText parseText format ["<t color='#ffffff'>Bank: $%1</t><br/><t color='#ffffff'>Cash: $%2</t>",[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];

Step 3. In Altis_Life.Altis\dialog\fuction\fn_bankDeposit.sqf Under private ["_value"]; Paste

_depoAll = [_this,0,0] call BIS_fnc_param;
if(_depoAll == 1) then {
	_value = CASH;
} else {
	_value = parseNumber(ctrlText 2702);
};

it should look like this

#include "..\..\script_macros.hpp"
/*
    File: fn_bankDeposit.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Figure it out.
*/
private ["_value"];

_depoAll = [_this,0,0] call BIS_fnc_param;
if(_depoAll == 1) then {
	_value = CASH;
} else {
	_value = parseNumber(ctrlText 2702);
};

//Series of stupid checks
if (_value > 999999) exitWith {hint localize "STR_ATM_GreaterThan";};
if (_value < 0) exitWith {};
if (!([str(_value)] call TON_fnc_isnumber)) exitWith {hint localize "STR_ATM_notnumeric"};
if (_value > CASH) exitWith {hint localize "STR_ATM_NotEnoughCash"};

CASH = CASH - _value;
BANK = BANK + _value;

hint format [localize "STR_ATM_DepositSuccess",[_value] call life_fnc_numberText];
[] call life_fnc_atmMenu;
[6] call SOCK_fnc_updatePartial;

if (LIFE_SETTINGS(getNumber,"player_moneyLog") isEqualTo 1) then {
    if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then {
        money_log = format [localize "STR_DL_ML_depositedBank_BEF",_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
    } else {
        money_log = format [localize "STR_DL_ML_depositedBank",profileName,(getPlayerUID player),_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
    };
    publicVariableServer "money_log";
};

Step 4. In Altis_Life.Altis\stringtable.xml Paste 

       <Key ID="STR_ATM_Deposit_All">
           <Original>Deposit All</Original>
       </Key>

Under 

       <Key ID="STR_ATM_Deposit">
           <Original>Deposit</Original>
           <Czech>Vklad</Czech>
           <Spanish>Depositar</Spanish>
           <Russian></Russian>
           <German>Einzahlen</German>
           <French>Déposer</French>
           <Italian>Deposita</Italian>
           <Portuguese>Depositar</Portuguese>
           <Polish>Deopozyt</Polish>
       </Key>

Done !! 

If you would just like the Deposit-all button all you need to do is Step 3. and make a Deposit-all button and put 

onButtonClick = "[1] call life_fnc_bankDeposit";

on it.

If you would like to make your own bank.hpp. https://github.com/kayler-renslow/arma-dialog-creator/releases Linked by @Deadlesszombie 

it's a great way to make dialogs. if you got any questions. ask me on discord PowerGamer#2936 I can respond much faster.

Also 🎉Happy New Year 🎉

Edited by Daniel Stewart
  • Like 1

Share this post


Link to post
Share on other sites

This is how my bankdepost looks like:

Spoiler

#include "..\..\script_macros.hpp"
/*
    File: fn_bankDeposit.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Figure it out.
*/
private ["_value"];
_value = parseNumber(ctrlText 2702);

//Series of stupid checks
if (_value > 999999) exitWith {hint localize "STR_ATM_GreaterThan";};
if (_value < 0) exitWith {};
if (!([str(_value)] call TON_fnc_isnumber)) exitWith {hint localize "STR_ATM_notnumeric"};
if (_value > CASH) exitWith {hint localize "STR_ATM_NotEnoughCash"};

CASH = CASH - _value;
BANK = BANK + _value;

hint format [localize "STR_ATM_DepositSuccess",[_value] call life_fnc_numberText];
[] call life_fnc_atmMenu;
[6] call SOCK_fnc_updatePartial;

if (LIFE_SETTINGS(getNumber,"player_moneyLog") isEqualTo 1) then {
    if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then {
        money_log = format [localize "STR_DL_ML_depositedBank_BEF",_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
    } else {
        money_log = format [localize "STR_DL_ML_depositedBank",profileName,(getPlayerUID player),_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
    };
    publicVariableServer "money_log";
};

[] call life_fnc_hudUpdate;

Should I paste the code below or above this? _value = parseNumber(ctrlText 2702); 

Share this post


Link to post
Share on other sites
5 hours ago, Daniel K. said:

This is how my bankdepost looks like:

  Reveal hidden contents

#include "..\..\script_macros.hpp"
/*
    File: fn_bankDeposit.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Figure it out.
*/
private ["_value"];
_value = parseNumber(ctrlText 2702);

//Series of stupid checks
if (_value > 999999) exitWith {hint localize "STR_ATM_GreaterThan";};
if (_value < 0) exitWith {};
if (!([str(_value)] call TON_fnc_isnumber)) exitWith {hint localize "STR_ATM_notnumeric"};
if (_value > CASH) exitWith {hint localize "STR_ATM_NotEnoughCash"};

CASH = CASH - _value;
BANK = BANK + _value;

hint format [localize "STR_ATM_DepositSuccess",[_value] call life_fnc_numberText];
[] call life_fnc_atmMenu;
[6] call SOCK_fnc_updatePartial;

if (LIFE_SETTINGS(getNumber,"player_moneyLog") isEqualTo 1) then {
    if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then {
        money_log = format [localize "STR_DL_ML_depositedBank_BEF",_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
    } else {
        money_log = format [localize "STR_DL_ML_depositedBank",profileName,(getPlayerUID player),_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
    };
    publicVariableServer "money_log";
};

[] call life_fnc_hudUpdate;

Should I paste the code below or above this? _value = parseNumber(ctrlText 2702); 

U can just copy and paste the should like one. But the _value = parseNumber(ctrlText 2702); is in the _deopall under else just look at step 3 again :)

Share this post


Link to post
Share on other sites
14 hours ago, Daniel Stewart said:

U can just copy and paste the should like one. But the _value = parseNumber(ctrlText 2702); is in the _deopall under else just look at step 3 again :)

Oh ok sweet, deposit all button works now. It was kinda silly by me that I didn't copy the should look like but anyways, thanks.

Edited by Daniel K.

Share this post


Link to post
Share on other sites
13 hours ago, ✪ Bateka said:

@Daniel Stewart Hello nice job, but why you don't add the gang deposit and the gang withdraw ??

I just don't use it on my server. but here :)
 

class Life_atm_management {
	idd = 2700;
  name= "life_atm_menu";
	movingEnable = 0;
	enableSimulation = 1;

	class ControlsBackground
	{
		class Life_RscTitleBackground : Life_RscText 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.3625;
			y = safeZoneY + safeZoneH * 0.38425926;
			w = safeZoneW * 0.29114584;
			h = safeZoneH * 0.02222223;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
			
		};
		class MainBackground : Life_RscText 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.361875;
			y = safeZoneY + safeZoneH * 0.41;
			w = safeZoneW * 0.29125;
			h = safeZoneH * 0.18555556;
			colorBackground[] = {0,0,0,0.7};
			
		};
		
	};
	class Controls
	{
		class CashTitle : Life_RscStructuredText 
		{
			idc = 2701;
			x = safeZoneX + safeZoneW * 0.36666667;
			y = safeZoneY + safeZoneH * 0.4175926;
			w = safeZoneW * 0.17447917;
			h = safeZoneH * 0.04907408;
			text = "";
			colorBackground[] = {1,1,1,0};
			class Attributes
			{
				font = "RobotoCondensed";
				color = "#ffffff";
				align = "left";
				
			};
			
		};
		class Title : Life_RscTitle 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.3640625;
			y = safeZoneY + safeZoneH * 0.38240741;
			w = safeZoneW * 0.28697917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Title";
			colorBackground[] = {0,0,0,0};
			
		};
		class WithdrawButton : Life_RscButtonMenu 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.365625;
			y = safeZoneY + safeZoneH * 0.54351852;
			w = safeZoneW * 0.06197917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Withdraw";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[] call life_fnc_bankWithdraw";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;
				
			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;
				
			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);
				
			};
			
		};
		class DepositButton : Life_RscButtonMenu 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.4296875;
			y = safeZoneY + safeZoneH * 0.54351852;
			w = safeZoneW * 0.06197917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Deposit";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[] call life_fnc_bankDeposit";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;
				
			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;
				
			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);
				
			};
			
		};
		class moneyEdit : Life_RscEdit 
		{
			idc = 2702;
			x = safeZoneX + safeZoneW * 0.36822917;
			y = safeZoneY + safeZoneH * 0.50370371;
			w = safeZoneW * 0.27760417;
			h = safeZoneH * 0.01851852;
			text = "1";
			colorSelection[] = {1,0,0,1};
			sizeEx = 0.030;
			
		};
		class PlayerList : Life_RscCombo 
		{
			idc = 2703;
			x = safeZoneX + safeZoneW * 0.36822917;
			y = safeZoneY + safeZoneH * 0.47777778;
			w = safeZoneW * 0.27760417;
			h = safeZoneH * 0.01666667;
			class ComboScrollBar
			{
				color[] = {1,1,1,1};
				thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
				arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
				arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
				border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
				
			};
			
		};
		class TransferButton : Life_RscButtonMenu 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.55833334;
			y = safeZoneY + safeZoneH * 0.54351852;
			w = safeZoneW * 0.06197917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Transfer";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[] call life_fnc_bankTransfer";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;
				
			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;
				
			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);
				
			};
			
		};
		class CloseButtonKey : Life_RscButtonMenu 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.361875;
			y = safeZoneY + safeZoneH * 0.6;
			w = safeZoneW * 0.064375;
			h = safeZoneH * 0.02222223;
			text = "$STR_Global_Close";
			onButtonClick = "closeDialog 0;";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;
				
			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;
				
			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);
				
			};
			
		};
		class DepositAllButton : Life_RscButtonMenu 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.49375;
			y = safeZoneY + safeZoneH * 0.54351852;
			w = safeZoneW * 0.06197917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Deposit_All";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[] call life_fnc_bankDeposit";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;
				
			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;
				
			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);
				
			};
			
		};
		class GangWithdraw : Life_RscButtonMenu 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.365625;
			y = safeZoneY + safeZoneH * 0.56888889;
			w = safeZoneW * 0.061875;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_WithdrawGang";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[] call life_fnc_gangWithdraw";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;
				
			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;
				
			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);
				
			};
			
		};
		class GangDeposit : Life_RscButtonMenu 
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.43;
			y = safeZoneY + safeZoneH * 0.56888889;
			w = safeZoneW * 0.061875;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_DepositGang";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[] call life_fnc_gangDeposit";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;
				
			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;
				
			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);
				
			};
			
		};
		
	};
	
};

 

  • Like 1

Share this post


Link to post
Share on other sites
On 12/31/2018 at 6:01 PM, Daniel Stewart said:

I have looked around and I found 1 tutorial on this and it was not clear what to do so I'm making this :)

----------------------------------------------------------------------------------------------------

Difficulty: Easy Steps. Simply Copy & Paste

Author: Daniel Stewart

----------------------------------------------------------------------------------------------------

Screenshot:

15b246abd1a638308f0187a5d739b796.png.b3ac4d56d10b58287d6c095d53c52624.png

Step 1. Copy & Paste into Alits_Life.Alits\dialog\bank.hpp

class Life_atm_management {
	idd = 2700;
  name= "life_atm_menu";
	movingEnable = 0;
	enableSimulation = 1;

  class ControlsBackground
	{
		class Life_RscTitleBackground : Life_RscText
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.3625;
			y = safeZoneY + safeZoneH * 0.38425926;
			w = safeZoneW * 0.29114584;
			h = safeZoneH * 0.02222223;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};

		};
		class MainBackground : Life_RscText
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.361875;
			y = safeZoneY + safeZoneH * 0.41;
			w = safeZoneW * 0.29125;
			h = safeZoneH * 0.16333334;
			colorBackground[] = {0,0,0,0.7};

		};

	};
	class Controls
	{
		class CashTitle : Life_RscStructuredText
		{
			idc = 2701;
			x = safeZoneX + safeZoneW * 0.36666667;
			y = safeZoneY + safeZoneH * 0.4175926;
			w = safeZoneW * 0.17447917;
			h = safeZoneH * 0.04907408;
			text = "";
			colorBackground[] = {1,1,1,0};
			class Attributes
			{
				font = "RobotoCondensed";
				color = "#ffffff";
				align = "left";

			};

		};
		class Title : Life_RscTitle
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.3640625;
			y = safeZoneY + safeZoneH * 0.38240741;
			w = safeZoneW * 0.28697917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Title";
			colorBackground[] = {0,0,0,0};

		};
		class WithdrawButton : Life_RscButtonMenu
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.365625;
			y = safeZoneY + safeZoneH * 0.54351852;
			w = safeZoneW * 0.06197917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Withdraw";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[] call life_fnc_bankWithdraw";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;

			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;

			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

			};

		};
		class DepositButton : Life_RscButtonMenu
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.4296875;
			y = safeZoneY + safeZoneH * 0.54351852;
			w = safeZoneW * 0.06197917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Deposit";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[0] call life_fnc_bankDeposit";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;

			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;

			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

			};

		};
		class moneyEdit : Life_RscEdit
		{
			idc = 2702;
			x = safeZoneX + safeZoneW * 0.36822917;
			y = safeZoneY + safeZoneH * 0.50370371;
			w = safeZoneW * 0.27760417;
			h = safeZoneH * 0.01851852;
			text = "1";
			colorSelection[] = {1,0,0,1};
			sizeEx = 0.030;

		};
		class PlayerList : Life_RscCombo
		{
			idc = 2703;
			x = safeZoneX + safeZoneW * 0.36822917;
			y = safeZoneY + safeZoneH * 0.47777778;
			w = safeZoneW * 0.27760417;
			h = safeZoneH * 0.01666667;
			class ComboScrollBar
			{
				color[] = {1,1,1,1};
				thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
				arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
				arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
				border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";

			};

		};
		class TransferButton : Life_RscButtonMenu
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.55833334;
			y = safeZoneY + safeZoneH * 0.54351852;
			w = safeZoneW * 0.06197917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Transfer";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[] call life_fnc_bankTransfer";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;

			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;

			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

			};

		};
		class CloseButtonKey : Life_RscButtonMenu
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.36197917;
			y = safeZoneY + safeZoneH * 0.57592593;
			w = safeZoneW * 0.06458334;
			h = safeZoneH * 0.02222223;
			text = "$STR_Global_Close";
			onButtonClick = "closeDialog 0;";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;

			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;

			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

			};

		};
		class DepositAllButton : Life_RscButtonMenu
		{
			idc = -1;
			x = safeZoneX + safeZoneW * 0.49375;
			y = safeZoneY + safeZoneH * 0.54351852;
			w = safeZoneW * 0.06197917;
			h = safeZoneH * 0.02222223;
			text = "$STR_ATM_Deposit_All";
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
			onButtonClick = "[1] call life_fnc_bankDeposit";
			class HitZone
			{
				top = 0.0;
				right = 0.0;
				bottom = 0.0;
				left = 0.0;

			};
			class ShortcutPos
			{
				top = 0.005;
				left = (6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005;
				w = 0.0225;
				h = 0.03;

			};
			class TextPos
			{
				top = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2;
				right = 0.005;
				bottom = 0.0;
				left = 0.25 * (((safezoneW / safezoneH) min 1.2) / 40);

			};

		};

	};

};

  Step 2. Find

CONTROL(2700,2701) ctrlSetStructuredText parseText format ["<img size='1.7' image='icons\ico_bank.paa'/> $%1<br/><img size='1.6' image='icons\ico_money.paa'/> $%2",[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];

in Altis_Life.Altis\core\shops\fn_atmMenu.sqf replace with

CONTROL(2700,2701) ctrlSetStructuredText parseText format ["<t color='#ffffff'>Bank: $%1</t><br/><t color='#ffffff'>Cash: $%2</t>",[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];

Step 3. In Altis_Life.Altis\dialog\fuction\fn_bankDeposit.sqf Under private ["_value"]; Paste

_depoAll = [_this,0,0] call BIS_fnc_param;
if(_depoAll == 1) then {
	_value = CASH;
} else {
	_value = parseNumber(ctrlText 2702);
};

it should look like this

#include "..\..\script_macros.hpp"
/*
    File: fn_bankDeposit.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Figure it out.
*/
private ["_value"];

_depoAll = [_this,0,0] call BIS_fnc_param;
if(_depoAll == 1) then {
	_value = CASH;
} else {
	_value = parseNumber(ctrlText 2702);
};

//Series of stupid checks
if (_value > 999999) exitWith {hint localize "STR_ATM_GreaterThan";};
if (_value < 0) exitWith {};
if (!([str(_value)] call TON_fnc_isnumber)) exitWith {hint localize "STR_ATM_notnumeric"};
if (_value > CASH) exitWith {hint localize "STR_ATM_NotEnoughCash"};

CASH = CASH - _value;
BANK = BANK + _value;

hint format [localize "STR_ATM_DepositSuccess",[_value] call life_fnc_numberText];
[] call life_fnc_atmMenu;
[6] call SOCK_fnc_updatePartial;

if (LIFE_SETTINGS(getNumber,"player_moneyLog") isEqualTo 1) then {
    if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then {
        money_log = format [localize "STR_DL_ML_depositedBank_BEF",_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
    } else {
        money_log = format [localize "STR_DL_ML_depositedBank",profileName,(getPlayerUID player),_value,[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
    };
    publicVariableServer "money_log";
};

Step 4. In Altis_Life.Altis\stringtable.xml Paste 

       <Key ID="STR_ATM_Deposit_All">
           <Original>Deposit All</Original>
       </Key>

Under 

       <Key ID="STR_ATM_Deposit">
           <Original>Deposit</Original>
           <Czech>Vklad</Czech>
           <Spanish>Depositar</Spanish>
           <Russian></Russian>
           <German>Einzahlen</German>
           <French>Déposer</French>
           <Italian>Deposita</Italian>
           <Portuguese>Depositar</Portuguese>
           <Polish>Deopozyt</Polish>
       </Key>

Done !! 

If you would just like the Deposit-all button all you need to do is Step 3. and make a Deposit-all button and put 

onButtonClick = "[1] call life_fnc_bankDeposit";

on it.

If you would like to make your own bank.hpp. https://github.com/kayler-renslow/arma-dialog-creator/releases Linked by @Deadlesszombie 

it's a great way to make dialogs. if you got any questions. ask me on discord DANIΞL#2936 I can respond much faster.

Also 🎉Happy New Year 🎉

for me have loot bugs  cant select player for transfer and cant deposit money in my acount and deposit all not work too

 

 

so ideas?

Share this post


Link to post
Share on other sites
On 6/5/2020 at 7:18 PM, Enrah said:

check you did 

If you would just like the Deposit-all button all you need to do is Step 3. and make a Deposit-all button and put 

onButtonClick = "[1] call life_fnc_bankDeposit";

on it.

_depoAll = [_this,0,0] call BIS_fnc_param;
if(_depoAll == 1) then {
	_value = CASH;
} else {
	_value = parseNumber(ctrlText 2702);
};

 

Edited by Daniel Stewart

Share this post


Link to post
Share on other sites
9 hours ago, Daniel Stewart said:

check you did 

If you would just like the Deposit-all button all you need to do is Step 3. and make a Deposit-all button and put 

onButtonClick = "[1] call life_fnc_bankDeposit";

on it.

_depoAll = [_this,0,0] call BIS_fnc_param;
if(_depoAll == 1) then {
	_value = CASH;
} else {
	_value = parseNumber(ctrlText 2702);
};

 

Yep managed to get it working now thank you!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.