
All checks were successful
Build / Build (push) Successful in 28s
This commit refactors several client-side functions to improve code consistency and readability. - Standardizes function descriptions by removing redundant "Function: forge_client..." prefixes and "[Description]" sections, focusing on concise descriptions of the function's purpose. - Updates variable handling in arsenal functions to use GVAR and EGVARS for default values, improving consistency and reducing code duplication. - Removes the bank init function as it is no longer needed. - Adds a done variable to the preinit file.
28 lines
731 B
Plaintext
28 lines
731 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Changes the payment method of the store
|
|
*
|
|
* Arguments:
|
|
* 0: Control <CONTROL> - The control that was changed
|
|
* 1: Selected Index <NUMBER> - The index of the selected item
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [_paymentList, 0] call forge_store_fnc_changePayment
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_control", "_selectedIndex"];
|
|
|
|
private _display = ctrlParent _control;
|
|
private _selectedPayment = _control lbData _selectedIndex;
|
|
private _selectedPaymentTitle = _control lbText _selectedIndex;
|
|
|
|
[format ["You have selected %1 as your payment method.", _selectedPaymentTitle], "info", 3, "right"] call EFUNC(misc,notify);
|
|
|
|
GVAR(activePayment) = _selectedPayment; |