
This commit introduces several enhancements to the Forge client, including improved documentation for the Garage and Locker modules, updates to variable names for consistency, and additions to the .gitignore file. The following changes were made: - **Garage and Locker Modules:** Added comprehensive README.md files to the Garage and Locker modules, providing overviews, dependency information, author details, feature descriptions, event handler usage, debugging instructions, and version information. - **Variable Name Consistency:** Updated variable names in `fnc_playerDBSave.sqf` and `fnc_firstLogin.sqf` to use the `FORGE_PayGrade` constant instead of `Paygrade` for consistency with the Forge naming conventions. - **.gitignore:** Added `/api` to the .gitignore file to exclude the Forge API directory from version control.
53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Function: forge_client_init_fnc_playerDBSave
|
|
* Author: IDSolutions
|
|
*
|
|
* [Description]
|
|
* 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 _default_armory_unlocks = [[],[],[],[]];
|
|
private _default_garage_unlocks = [[],[],[],[],[],[]];
|
|
|
|
private _data = [
|
|
getPlayerUID player,
|
|
"armory_unlocks", [GETVAR(player,Armory_Unlocks,_default_armory_unlocks)],
|
|
"garage_unlocks", [GETVAR(player,Garage_Unlocks,_default_garage_unlocks)],
|
|
"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,"unknown")],
|
|
"email", [GETVAR(player,FORGE_Email,"unknown@spearnet.mil")],
|
|
"paygrade", [GETVAR(player,FORGE_PayGrade,"E1")],
|
|
"organization", [GETVAR(player,FORGE_Organization,"")],
|
|
"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]; |