
All checks were successful
Build / Build (push) Successful in 28s
This commit introduces the timesheet submission feature and displays pending payments in the bank UI. The following changes were made: - Added a "Submit Timesheet" action tile to the bank UI. - Implemented the `handleTimesheet` function in `script.js` to handle timesheet submissions. - Updated the UI to display pending payments based on player rating and a server-side multiplier. - Modified server-side event handling to process timesheet submissions and calculate payments. - Added a refresh timer to update player data every 30 seconds. - Updated the player load event to include the player's rating.
34 lines
746 B
Plaintext
34 lines
746 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Deposits money into the bank.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [] call forge_client_bank_fnc_deposit;
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
private _amount = parseNumber (ctrlText IDC_AMOUNTINPUT);
|
|
|
|
private _messageData = createHashMapFromArray [
|
|
["event", "DEPOSIT::FUNDS"],
|
|
["data", createHashMapFromArray [
|
|
["amount", _amount]
|
|
]]
|
|
];
|
|
|
|
private _response = ["forge_client_bank_handleEvents", (toJSON _messageData)] call CFUNC(localEvent);
|
|
|
|
if (_response) then {
|
|
[format ["Deposited $%1", _amount], "info", 3, "right"] call EFUNC(misc,notify);
|
|
} else {
|
|
[format ["Deposit failed"], "warning", 3, "right"] call EFUNC(misc,notify);
|
|
}; |