
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.
47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Save player to DB
|
|
*
|
|
* Arguments:
|
|
* N/A
|
|
*
|
|
* Return Value:
|
|
* N/A
|
|
*
|
|
* Examples:
|
|
* [] call forge_client_init_fnc_playerDBSave (Server or Singleplayer Only)
|
|
* [] remoteExecCall ["forge_client_init_fnc_playerDBSave", 2, false] (Multiplayer Only)
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
private _data = [
|
|
getPlayerUID player,
|
|
"armory_unlocks", [GETVAR(player,Armory_Unlocks,EGVAR(arsenal,default_armory))],
|
|
"garage_unlocks", [GETVAR(player,Garage_Unlocks,EGVAR(arsenal,default_garage))],
|
|
"locker", [GETVAR(player,FORGE_Locker,[])],
|
|
"garage", [GETVAR(player,FORGE_Garage,[])],
|
|
"cash", [GETVAR(player,FORGE_Cash,0)],
|
|
"bank", [GETVAR(player,FORGE_Bank,0)],
|
|
"number", [GETVAR(player,FORGE_Phone_Number,QUOTE(unknown))],
|
|
"email", [GETVAR(player,FORGE_Email,QUOTE(unknown@spearnet.mil))],
|
|
"paygrade", [GETVAR(player,FORGE_PayGrade,QUOTE(E1))],
|
|
"organization", [GETVAR(player,FORGE_Organization,QUOTE(None))],
|
|
"reputation", [rating player],
|
|
"loadout", [getUnitLoadout player],
|
|
"holster", [GETVAR(player,FORGE_Holster_Weapon,true)],
|
|
"position", [getPosASLVisual player],
|
|
"direction", [getDirVisual player]
|
|
];
|
|
|
|
if (isNull objectParent player) then {
|
|
_data pushBack "currentWeapon";
|
|
_data pushBack [currentMuzzle player];
|
|
_data pushBack "stance";
|
|
_data pushBack [stance player];
|
|
};
|
|
|
|
// ["hsetBulk", "", "", -1, _data, "", false] spawn dragonfly_db_fnc_addTask;
|
|
["hsetidbulk", "", "", -1, _data, "", false, netId player] remoteExec ["dragonfly_db_fnc_addTask", 2, false]; |