How to add new vehicles in the vehicle store ?

  • Offline SeveN
  • Fresh Spawn
  • *
  • Posts: 8

How to add new vehicles in the vehicle store ?

« posted: Feb 14, 2019, 04:55 PM »
Hi everyone, I am new to the branch of missions edition in Arma3, I am Brazilian so my English is not one of the best, I am editing the mission and I am changing the values ​​and items of Gun Stores, Vehicle Stores and General Store, and I came across something, in the code of airplanes presents the aircraft "To-201 Shikra and F / A-181 Black Wasp" in the code, more inside the vehicle stores does not exist, someone could help me.
code:

Code: [Select]
planesArray = compileFinal str
[
["Caesar BTT", "C_Plane_Civil_01_F", 2500, "vehicle"],

["A-143 Buzzard AA", "I_Plane_Fighter_03_dynamicLoadout_F", 150000, "vehicle", "variant_buzzardAA"],
["A-143 Buzzard CAS", "I_Plane_Fighter_03_dynamicLoadout_F", 155000, "vehicle", "variant_buzzardCAS"],

["A-149 Gryphon", "I_Plane_Fighter_04_F", 185000, "vehicle"],

["F/A-181 Black Wasp (Gun-Only)", "B_Plane_Fighter_01_Stealth_F", 165000, "vehicle", "HIDDEN"], // no missiles or bombs
["F/A-181 Black Wasp AA", "B_Plane_Fighter_01_F", 195000, "vehicle", "variant_blackwaspAA", "HIDDEN"],
["F/A-181 Black Wasp CAS", "B_Plane_Fighter_01_F", 245000, "vehicle", "HIDDEN"],

["To-201 Shikra (Gun-Only)", "O_Plane_Fighter_02_Stealth_F", 170000, "vehicle", "HIDDEN"], // no missiles or bombs
["To-201 Shikra AA", "O_Plane_Fighter_02_F", 200000, "vehicle", "variant_shikraAA", "HIDDEN"],
["To-201 Shikra CAS", "O_Plane_Fighter_02_F", 250000, "vehicle", "HIDDEN"],

["A-164 Wipeout CAS", "B_Plane_CAS_01_dynamicLoadout_F", 250000, "vehicle"],
["To-199 Neophron CAS", "O_Plane_CAS_02_dynamicLoadout_F", 235000, "vehicle"],

["V-44 X Blackfish (Infantry)", "B_T_VTOL_01_infantry_F", 40000, "vehicle"],
["V-44 X Blackfish (Gunship)", "B_T_VTOL_01_armed_F", 85000, "vehicle"],
["Y-32 Xi'an", "O_T_VTOL_02_infantry_dynamicLoadout_F", 125000, "vehicle"],

["KH-3A Fenghuang Missile UAV", "O_T_UAV_04_CAS_F", 130000, "vehicle"],

["MQ4A Greyhawk Missile UAV", "B_UAV_02_dynamicLoadout_F", 130000, "vehicle", "variant_greyhawkMissile"],
["K40 Ababil-3 Missile UAV", "O_UAV_02_dynamicLoadout_F", 130000, "vehicle", "variant_greyhawkMissile"],
["K40 Ababil-3 Missile UAV", "I_UAV_02_dynamicLoadout_F", 130000, "vehicle", "variant_greyhawkMissile"],

["MQ4A Greyhawk Bomber UAV", "B_UAV_02_dynamicLoadout_F", 80000, "vehicle", "variant_greyhawkBomber"], // Bomber UAVs are a lot harder to use, hence why they are cheaper than Missile ones
["K40 Ababil-3 Bomber UAV", "O_UAV_02_dynamicLoadout_F", 80000, "vehicle", "variant_greyhawkBomber"],
["K40 Ababil-3 Bomber UAV", "I_UAV_02_dynamicLoadout_F", 80000, "vehicle", "variant_greyhawkBomber"],

["MQ4A Greyhawk Cluster UAV", "B_UAV_02_dynamicLoadout_F", 90000, "vehicle", "variant_greyhawkCluster"],
["K40 Ababil-3 Cluster UAV", "O_UAV_02_dynamicLoadout_F", 90000, "vehicle", "variant_greyhawkCluster"],
["K40 Ababil-3 Cluster UAV", "I_UAV_02_dynamicLoadout_F", 90000, "vehicle", "variant_greyhawkCluster"],

["MQ4A Greyhawk DAGR UAV", "B_UAV_02_dynamicLoadout_F", 160000, "vehicle", "variant_greyhawkDAGR"],
["K40 Ababil-3 DAGR UAV", "O_UAV_02_dynamicLoadout_F", 160000, "vehicle", "variant_greyhawkDAGR"],
["K40 Ababil-3 DAGR UAV", "I_UAV_02_dynamicLoadout_F", 160000, "vehicle", "variant_greyhawkDAGR"],

["UCAV Sentinel Missile", "B_UAV_05_F", 155000, "vehicle", "variant_sentinelMissile"],
["UCAV Sentinel Bomber", "B_UAV_05_F", 100000, "vehicle", "variant_sentinelBomber"],
["UCAV Sentinel Cluster", "B_UAV_05_F", 115000, "vehicle", "variant_sentinelCluster"]
];


this file is called: storeConfig.sqf

Re: How to add new vehicles in the vehicle store ?

« Reply #1 posted: Feb 14, 2019, 07:06 PM »
Hello SeveN,

You are not seeing it in the store because it has value : hide .

Example :
["F/A-181 Black Wasp AA", "B_Plane_Fighter_01_F", 195000, "vehicle", "variant_blackwaspAA", "HIDDEN"],

If you want to make them appear, just delete this value.

Example :
["F/A-181 Black Wasp AA", "B_Plane_Fighter_01_F", 195000, "vehicle", "variant_blackwaspAA"],

Hoping to have helped you.

Regards,

PS: You should have asked your question in Part: Editing & Coding
Only Paranoids survive ...
  • Offline SeveN
  • Fresh Spawn
  • *
  • Posts: 8

Re: How to add new vehicles in the vehicle store ?

« Reply #2 posted: Feb 15, 2019, 01:48 AM »
thank you, you save my life


Another question I wanted to add guns to civil aircraft, I tried several more ways without success, can you help me?

Re: How to add new vehicles in the vehicle store ?

« Reply #3 posted: Feb 15, 2019, 06:27 PM »
I beg you, it was a minimal help  :)

Here's who should help you with your request for Armed Caesar BTT :

http://forums.a3wasteland.com/index.php?topic=3126.0

Hoping to have helped you.

Regards,
Only Paranoids survive ...
  • Offline SeveN
  • Fresh Spawn
  • *
  • Posts: 8

Re: How to add new vehicles in the vehicle store ?

« Reply #4 posted: Feb 15, 2019, 07:09 PM »
Yes, I edited the file with these settings
Code: [Select]
case (_class isKindOf "Plane_Civil_01_base_F"):
{
_mags =
[
["5000Rnd_762x51_Belt", [-1]],
["120Rnd_CMFlare_Chaff_Magazine", [-1]],
["24Rnd_missiles", [-1]]
];
_weapons =
[
["M134_minigun", [-1]],
["CMFlareLauncher", [-1]],
["missiles_DAR", [-1]]
];
};


only it does not work

I'm a beginner, I did not understand very well, and I also wanted to put the pib pib pib from missel guided titan for example
  • Offline SeveN
  • Fresh Spawn
  • *
  • Posts: 8

Re: How to add new vehicles in the vehicle store ?

« Reply #5 posted: Feb 15, 2019, 07:14 PM »

I do not know why this is here:
[-1]
in the end

Re: How to add new vehicles in the vehicle store ?

« Reply #6 posted: Feb 15, 2019, 09:31 PM »
I do not know why this is here:
[-1]
in the end


These values indicate who will have the control of the armament in the vehicle :

-1 for the Pilot
0 for the Copilot

Quote
Yes, I edited the file with these settings

In which file did you paste this code ?


Quote
I'm a beginner, I did not understand very well, and I also wanted to put the pib pib pib from missel guided titan for example

AgentRev did a Mod Update 2 days ago about this, I invite you to check the changes :

https://github.com/A3Wasteland

I also give you personal advice:

Do not try to go too fast, and take the time to fully understand what you do each time, this is the key to success  ;)

Hoping to have helped you.

Regards,
Only Paranoids survive ...
  • Offline SeveN
  • Fresh Spawn
  • *
  • Posts: 8

Re: How to add new vehicles in the vehicle store ?

« Reply #7 posted: Feb 16, 2019, 01:46 AM »
I edit this file vehicleLoadouts.sqf

Re: How to add new vehicles in the vehicle store ?

« Reply #8 posted: Feb 16, 2019, 06:38 PM »
I just tested, and it works perfectly.

So I think you've made a small mistake somewhere.

I think you're wrong file. As a reminder, it is necessary to modify the
... / modConfig /vehicleLoadouts.sqf

Or, You have not indicated the correct Model/Name of the aircraft. As a reminder, the correct Model/Name is:
C_Plane_Civil_01_F

(Use: C_Plane_Civil_01_racing_F, if you want to keep a civilian version  ;)).

Hoping to have helped you.

Regards,
Only Paranoids survive ...
  • Offline SeveN
  • Fresh Spawn
  • *
  • Posts: 8

Re: How to add new vehicles in the vehicle store ?

« Reply #9 posted: Feb 17, 2019, 04:33 PM »
How to add a button in atm ?

I copy and edit the file "deposit.sqf" and created the file "depositall.sqf", more not work

code:
Code: [Select]

#include "gui_defines.hpp"

#define ERR_NOT_ENOUGH_FUNDS "You don't have enough money."
#define ERR_MAX_BALANCE "Your account has reached the maximum balance."

disableSerialization;
private ["_dialog", "_input", "_amount", "_balance", "_maxBalance"];

_dialog = findDisplay AtmGUI_IDD;

if (isNull _dialog) exitWith {};

_input = _dialog displayCtrl AtmAmountInput_IDC;
_amount = player getVariable ["cmoney", 0];

if (_amount < 1) exitWith {};

if (player getVariable ["cmoney", 0] < _amount) exitWith
{
[ERR_NOT_ENOUGH_FUNDS, 5] call mf_notify_client;
playSound "FD_CP_Not_Clear_F";
};

_balance = player getVariable ["bmoney", 0];
_maxBalance = ["A3W_atmMaxBalance", 1000000] call getPublicVar;

if (_balance + _amount > _maxBalance) then
{
_amount = 0 max (_maxBalance - _balance);
};

if (_amount < 1) exitWith
{
[ERR_MAX_BALANCE, 5] call mf_notify_client;
playSound "FD_CP_Not_Clear_F";
};

_input ctrlSetText (_amount call fn_numToStr);

if (!isServer) then { player setVariable ["cmoney", (player getVariable ["cmoney", 0]) - _amount, false] }; // temp client-side update, do not set to true

// pvar_processTransaction = ["atm", player, _amount];
// publicVariableServer "pvar_processTransaction";
["atm", player, _amount] call A3W_fnc_processTransaction;



I edit more files, for the above file to work, this files are: "gui_defines.hpp", "atm_gui.hpp", "select_account.sqf" and "init.sqf"

codes:

gui_defines.hpp:
Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Name: gui_defines.hpp
// @file Author: AgentRev

#define AtmGUI_IDD 63211
#define AtmBalanceText_IDC 1010
#define AtmAmountInput_IDC 1020
#define AtmBountyCheckbox_IDC 1025
#define AtmBountyLabel_IDC 1026
#define AtmAccountDropdown_IDC 1030
#define AtmFeeLabel_IDC 1035
#define AtmFeeText_IDC 1040
#define AtmTotalLabel_IDC 1045
#define AtmTotalText_IDC 1050
#define AtmDepositButton_IDC 2010
#define AtmDepositAllButton_IDC 2040
#define AtmWithdrawButton_IDC 2020
#define AtmCancelButton_IDC 2030


atm_gui.hpp
Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Name: atm_gui.hpp
// @file Author: AgentRev

#include "gui_defines.hpp"

class AtmGUI
{
idd = AtmGUI_IDD;
movingEnable = true;
enableSimulation = true;
controls[] = {AtmBalanceHead, AtmBalanceText, AtmAmountLabel, AtmAmountInput, AtmBountyCheckbox, AtmBountyLabel, AtmAccountLabel, AtmAccountDropdown, AtmFeeLabel, AtmFeeText, AtmTotalLabel, AtmTotalText, AtmDepositButton, AtmWithdrawButton, AtmCancelButton};
controlsBackground[] = {AtmBG, AtmTopBG, AtmTopLogo, AtmBalanceBG};


#define Atm_TEXT_SIZE (0.04 * TEXT_SCALE)

class AtmLabelText : w_RscText {
sizeEx = Atm_TEXT_SIZE;
};


class AtmBG : IGUIBack
{
idc = -1;
colorBackground[] = {0, 0, 0, 0.6};

#define AtmBG_W (0.5 * X_SCALE)
#define AtmBG_H (0.4 * Y_SCALE)
#define AtmBG_X (0.5 - (AtmBG_W / 2)) // middle of screen
#define AtmBG_Y (0.5 - (AtmBG_H / 2)) // middle of screen

x = AtmBG_X;
y = AtmBG_Y;
w = AtmBG_W;
h = AtmBG_H;
};

class AtmTopBG : IGUIBack
{
idc = -1;
colorBackground[] = {A3W_UICOLOR_R, A3W_UICOLOR_G, A3W_UICOLOR_B, 0.8};

#define AtmTopBG_Y AtmBG_Y
#define AtmTopBG_H (0.08 * Y_SCALE)

x = AtmBG_X;
y = AtmTopBG_Y;
w = AtmBG_W;
h = AtmTopBG_H;
};

class AtmTopLogo : w_RscPicture
{
idc = -1;
text = "client\icons\suatmm_logo.paa";

#define AtmTopLogo_W (0.08 * X_SCALE)
#define AtmTopLogo_H (0.08 * Y_SCALE)
#define AtmTopLogo_X (AtmBG_X + CENTER(AtmBG_W, AtmTopLogo_W))
#define AtmTopLogo_Y (AtmTopBG_Y + CENTER(AtmTopBG_H, AtmTopLogo_H))

x = AtmTopLogo_X;
y = AtmTopLogo_Y;
w = AtmTopLogo_W;
h = AtmTopLogo_H;
};


#define Atm_OUTER_MARGIN_X (0.02 * X_SCALE)
#define Atm_OUTER_MARGIN_Y (0.02 * Y_SCALE)

#define Atm_INNER_MARGIN_X (0.01 * X_SCALE)
#define Atm_INNER_MARGIN_Y (0.01 * Y_SCALE)

#define AtmBalanceBG_W (AtmBG_W - (Atm_OUTER_MARGIN_X * 2))
#define AtmBalanceBG_X (AtmBG_X + Atm_OUTER_MARGIN_X)
#define AtmBalanceBG_Y (AtmTopBG_Y + AtmTopBG_H + Atm_OUTER_MARGIN_Y)


class AtmBalanceHead : w_RscStructuredText
{
idc = -1;
text = "<t underline='true' shadow='0'>Balance</t>";
size = 0.035 * TEXT_SCALE;

#define AtmBalanceHead_W AtmBalanceBG_W
#define AtmBalanceHead_H (0.022 * Y_SCALE)
#define AtmBalanceHead_X AtmBalanceBG_X
#define AtmBalanceHead_Y (AtmBalanceBG_Y + (Atm_INNER_MARGIN_Y / 2))

x = AtmBalanceHead_X;
y = AtmBalanceHead_Y;
w = AtmBalanceHead_W;
h = AtmBalanceHead_H;
};

class AtmBalanceText : w_RscStructuredText
{
idc = AtmBalanceText_IDC;
text = "$0";
size = 0.06 * TEXT_SCALE;

class Attributes : Attributes {
color = "#80FF80";
align = "center";
};

#define AtmBalanceText_W AtmBalanceBG_W
#define AtmBalanceText_H (0.03 * Y_SCALE)
#define AtmBalanceText_X AtmBalanceBG_X
#define AtmBalanceText_Y (AtmBalanceHead_Y + AtmBalanceHead_H)

x = AtmBalanceText_X;
y = AtmBalanceText_Y;
w = AtmBalanceText_W;
h = AtmBalanceText_H;
};

class AtmBalanceBG : IGUIBack
{
idc = -1;
colorBackground[] = {0.15, 0.15, 0.15, 0.9};

#define AtmBalanceBG_H ((AtmBalanceText_Y - AtmBalanceBG_Y) + AtmBalanceText_H + Atm_INNER_MARGIN_Y)

x = AtmBalanceBG_X;
y = AtmBalanceBG_Y;
w = AtmBalanceBG_W;
h = AtmBalanceBG_H;
};


#define AtmLabel_W (0.08 * X_SCALE)
#define AtmLabel_H (0.02 * Y_SCALE)
#define AtmLabel_X (AtmBG_X + Atm_OUTER_MARGIN_X)

#define AtmBountyLabel_W (0.06 * X_SCALE)
#define AtmBountyLabel_X ((AtmBalanceBG_X + AtmBalanceBG_W) - AtmBountyLabel_W)
#define AtmBountyLabel_Y (AtmAmountInput_Y + (AtmLabel_Y_OFFSET/2))

#define AtmBountyCheckbox_W (0.028 * Y_SCALE)
#define AtmBountyCheckbox_H (0.028 * Y_SCALE)
#define AtmBountyCheckbox_X ((AtmBountyLabel_X - AtmBountyCheckbox_W) + (0.003 * X_SCALE))
#define AtmBountyCheckbox_Y (AtmAmountInput_Y)

#define AtmInput_X (AtmLabel_X + AtmLabel_W + Atm_INNER_MARGIN_X)
#define AtmAmountInput_W ((AtmBountyCheckbox_X - AtmInput_X) - Atm_INNER_MARGIN_X)
#define AtmInput_W (AtmBG_W - ((AtmInput_X - AtmLabel_X) + (Atm_OUTER_MARGIN_X * 2)))
#define AtmInput_H (0.028 * Y_SCALE)
#define AtmInput_Y_START (AtmBalanceBG_Y + AtmBalanceBG_H + Atm_OUTER_MARGIN_Y)
#define AtmInput_Y_MARGIN (AtmInput_H + Atm_INNER_MARGIN_Y)

#define AtmLabel_Y_OFFSET CENTER(AtmInput_H, AtmLabel_H)


#define AtmAmountInput_Y AtmInput_Y_START

class AtmAmountLabel : AtmLabelText
{
idc = -1;
text = "Amount:";

#define AtmAmountLabel_Y (AtmAmountInput_Y + AtmLabel_Y_OFFSET)

x = AtmLabel_X;
y = AtmAmountLabel_Y;
w = AtmLabel_W;
h = AtmLabel_H;
};

class AtmAmountInput : RscEdit
{
idc = AtmAmountInput_IDC;
text = "";
sizeEx = Atm_TEXT_SIZE;

x = AtmInput_X;
y = AtmAmountInput_Y;
w = AtmAmountInput_W;
h = AtmInput_H;
};

class AtmBountyCheckbox
{
  idc = AtmBountyCheckbox_IDC;
type = 77;
style = 0;
checked = 0;
tooltip = "Place a Bounty on your enemies head.\nThe bounty will be rewarded to the killer of that target.\nThe bounty killer and target are NOT allowed\nto work together or join the same group.";
color[] = {1, 1, 1, 0.7};
colorFocused[] = {1, 1, 1, 1};
colorHover[] = {1, 1, 1, 1};
colorPressed[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.2};
colorBackground[] = {0, 0, 0, 0};
colorBackgroundFocused[] = {0, 0, 0, 0};
colorBackgroundHover[] = {0, 0, 0, 0};
colorBackgroundPressed[] = {0, 0, 0, 0};
colorBackgroundDisabled[] = {0, 0, 0, 0};
textureChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
textureUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
textureFocusedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
textureFocusedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
textureHoverChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
textureHoverUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
texturePressedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
texturePressedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
textureDisabledChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
textureDisabledUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
soundEnter[] = {1, 1, 1, 1};
soundPush[] = {1, 1, 1, 1};
soundClick[] = {1, 1, 1, 1};
soundEscape[] = {1, 1, 1, 1};
  x = AtmBountyCheckbox_X;
  y = AtmBountyCheckbox_Y;
  w = AtmBountyCheckbox_W;
  h = AtmBountyCheckbox_H;
};

class AtmBountyLabel : AtmLabelText
{
idc = AtmBountyLabel_IDC;
text = "Bounty";
  x = AtmBountyLabel_X;
  y = AtmBountyLabel_Y;
  w = AtmBountyLabel_W;
  h = AtmLabel_H;
};

#define AtmAccountDropdown_Y (AtmAmountInput_Y + AtmInput_Y_MARGIN)

class AtmAccountLabel : AtmLabelText
{
idc = -1;
text = "Account:";

#define AtmAccountLabel_Y (AtmAccountDropdown_Y + AtmLabel_Y_OFFSET)

x = AtmLabel_X;
y = AtmAccountLabel_Y;
w = AtmLabel_W;
h = AtmLabel_H;
};

class AtmAccountDropdown : RscCombo
{
idc = AtmAccountDropdown_IDC;
sizeEx = Atm_TEXT_SIZE;
wholeHeight = 0.35 * Y_SCALE;
colorBackground[] = {0, 0, 0, 0.6};

x = AtmInput_X;
y = AtmAccountDropdown_Y;
w = AtmInput_W;
h = AtmInput_H;
};


#define AtmFeeText_Y (AtmAccountDropdown_Y + AtmInput_Y_MARGIN)

class AtmFeeLabel : AtmLabelText
{
idc = AtmFeeLabel_IDC;
text = "Fee:";

#define AtmFeeLabel_Y (AtmFeeText_Y + AtmLabel_Y_OFFSET)

x = AtmLabel_X;
y = AtmFeeLabel_Y;
w = AtmLabel_W;
h = AtmLabel_H;
};

class AtmFeeText : AtmLabelText
{
idc = AtmFeeText_IDC;
text = "$0";
colorBackground[] = {0, 0, 0, 0.4};

x = AtmInput_X;
y = AtmFeeText_Y;
w = AtmInput_W;
h = AtmInput_H;
};


#define AtmTotalText_Y (AtmFeeText_Y + AtmInput_Y_MARGIN)

class AtmTotalLabel : AtmLabelText
{
idc = AtmTotalLabel_IDC;
text = "Total:";

#define AtmTotalLabel_Y (AtmTotalText_Y + AtmLabel_Y_OFFSET)

x = AtmLabel_X;
y = AtmTotalLabel_Y;
w = AtmLabel_W;
h = AtmLabel_H;
};

class AtmTotalText : AtmLabelText
{
idc = AtmTotalText_IDC;
text = "$0";
colorBackground[] = {0, 0, 0, 0.4};

x = AtmInput_X;
y = AtmTotalText_Y;
w = AtmInput_W;
h = AtmInput_H;
};


#define AtmButton_W ((AtmBG_W - ((Atm_OUTER_MARGIN_X * 2) + (Atm_INNER_MARGIN_X * 2))) / 3)
#define AtmButton_H (0.033 * Y_SCALE)
#define AtmButton_Y ((AtmBG_Y + AtmBG_H) - (Atm_OUTER_MARGIN_Y + AtmButton_H))

class AtmButton : w_RscButton
{
sizeEx = Atm_TEXT_SIZE;
y = AtmButton_Y;
w = AtmButton_W;
h = AtmButton_H;
};

class AtmGreenButton : AtmButton
{
colorBackground[] = {0, 0.5, 0, 1}; // normal
colorFocused[] = {0, 0.3, 0, 1}; // pulse
colorBackgroundActive[] = {0, 0.6, 0, 1}; // hover
};


class AtmDepositButton : AtmGreenButton
{
idc = AtmDepositButton_IDC;
text = "Deposit";
// action is defined in client\items\atm\select_account.sqf

#define AtmDepositButton_X (AtmBG_X + Atm_OUTER_MARGIN_X)

x = AtmDepositButton_X;
};

class AtmDepositAllButton : AtmGreenButton
{
idc = AtmDepositAllButton_IDC;
text = "Deposit All";
// action is defined in client\items\atm\select_account.sqf

#define AtmDepositAllButton_X (AtmDepositButton_X + Atm_INNER_MARGIN_X)

x = AtmDepositAllButton_X;
};

class AtmWithdrawButton : AtmGreenButton
{
idc = AtmWithdrawButton_IDC;
text = "Withdraw";
action = "call mf_items_atm_withdraw";

#define AtmWithdrawButton_X (AtmDepositAllButton_X + AtmButton_W + Atm_INNER_MARGIN_X)

x = AtmWithdrawButton_X;
};

class AtmCancelButton : AtmButton
{
idc = AtmCancelButton_IDC;
text = "Cancel";
action = "closeDialog 0";

#define AtmCancelButton_X (AtmWithdrawButton_X + AtmButton_W + Atm_INNER_MARGIN_X)

x = AtmCancelButton_X;
};
};

select_account.sqf
Code: [Select]
private ["_accDropdown", "_curSel", "_dialog", "_deposit", "_depositall", "_withdraw", "_bountyCheckbox", "_bountyChecked", "_selAcc", "_accDropdown", "_feeText", "_totalText", "_players", "_oldPlayers", "_strPlayers", "_selData", "_selAcc", "_idx", "_data", "_selIdx", "_amount", "_fee", "_deposit", "_depositall", "_withdraw"];

_accDropdown = _this select 0;
_curSel = _this select 1;
_dialog = ctrlParent _accDropdown;

_deposit = _dialog displayCtrl AtmDepositButton_IDC;
_depositall = _dialog displayCtrl AtmDepositAllButton_IDC;
_withdraw = _dialog displayCtrl AtmWithdrawButton_IDC;
_bountyCheckbox = _dialog displayCtrl AtmBountyCheckbox_IDC;

_bountyChecked = cbChecked _bountyCheckbox;
_selAcc = call compile (_accDropdown lbData _curSel);

if(!_bountyChecked)then{
if (!isNil "_selAcc" && {_selAcc != player}) then
{
_deposit ctrlSetText "Transfer";
_deposit buttonSetAction "call mf_items_atm_transfer";
if (ctrlShown _withdraw) then { _withdraw ctrlShow false };
}
else
{
_deposit ctrlSetText "Deposit";
_deposit buttonSetAction "call mf_items_atm_deposit";
if (!ctrlShown _withdraw) then { _withdraw ctrlShow true };
_depositall ctrlSetText "Deposit All";
_depositall buttonSetAction "call mf_items_atm_deposit";
if (!ctrlShown _withdraw) then { _withdraw ctrlShow true };
};
};

call mf_items_atm_refresh_amounts;

init.sqf
Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Name: init.sqf
// @file Author: AgentRev, MercifulFate

private ["_path", "_condition", "_action"];
_path = "client\items\atm";

mf_items_atm_can_access = [_path, "can_access.sqf"] call mf_compile;

mf_items_atm_access = [_path, "access.sqf"] call mf_compile;
mf_items_atm_refresh = [_path, "refresh.sqf"] call mf_compile;
mf_items_atm_refresh_amounts = [_path, "refresh_amounts.sqf"] call mf_compile;
mf_items_atm_select_account = [_path, "select_account.sqf"] call mf_compile;

mf_items_atm_deposit = [_path, "deposit.sqf"] call mf_compile;
mf_items_atm_deposit_all = [_path, "depositall.sqf"] call mf_compile;
mf_items_atm_withdraw = [_path, "withdraw.sqf"] call mf_compile;
mf_items_atm_transfer = [_path, "transfer.sqf"] call mf_compile;

mf_items_atm_add_bounty = [_path, "add_bounty.sqf"] call mf_compile;
mf_items_atm_select_bounty = [_path, "select_bounty.sqf"] call mf_compile;

mf_items_atm_nearest =
{
private _target = cursorObject;
if ((str _target) find ": atm_" == -1 && {{_target isKindOf _x} count ["Land_Atm_01_F","Land_Atm_02_F"] == 0}) exitWith { objNull };
if (!(_target getVariable ["A3W_atmEditorPlaced", false]) && ["A3W_atmEditorPlacedOnly"] call isConfigOn) exitWith { objNull };
_target
} call mf_compile;


_condition = "call mf_items_atm_can_access == ''";
_action = ["<img image='client\icons\suatmm_icon.paa'/> Access ATM", mf_items_atm_access, [], 10, true, true, "", _condition];
["atm-access", _action] call mf_player_actions_set;

I want to create a button to deposit everything in the character's hand