Commit cdd5b060 authored by Razer's avatar Razer
Browse files

Added comment headers

parent 367909d4
......@@ -9,6 +9,25 @@
* https://www.bistudio.com/monetization/
*/
/*
DESCRIPTION:
Attach object to another so that its saved to DB.
PARAMS:
1: OBJECT - Child Object
2: OBJECT - Parent Object
3: ARRAY (Optional) - Offset position
4: NUMBER (Optional) - Direction
5: ARRAY (Optional) - Position Advanced
6: BOOL (Optional) - Update DB (Default: true)
EXAMPLES:
[_childObject,_parentObject] call DB_fnc_attachTo;
[_childObject,_parentObject,[0,0,1],180] call DB_fnc_attachTo; // 1 meter above parent and facing at opposite direction
RETURNS:
TRUE if success, FALSE if failed.
*/
#include "\ApmsDB\constants.hpp"
// WARNING: setDir might not work properly in MP, use "_positionadvanced" instead (Object needs to be local to executer (server))
......
......@@ -9,12 +9,28 @@
* https://www.bistudio.com/monetization/
*/
/*
DESCRIPTION:
This function is used to register object to DB. Without this the object wont be restored on server restart
PARAMS:
1 - OBJECT: Object to be registerd.
2 - NUMBER (Optional): Object type. (Default: Based on "isKindOf")
3 - NUMBER (Optional): Object priority. (Default: Based on object type)
USAGE:
_success = [_object] call DB_fnc_registerObject;
RETURNS:
TRUE of success FALSE, if failed
*/
#include "\ApmsDB\constants.hpp"
params[["_object",objNull,[objNull]],["_objectType",-1,[0]], ["_priority",-1,[0]]];
if(isNull _object) exitWith {diag_log "<ApmsDB>: ERROR: Cannot create object. Object is null!"};
if(isNull _object) exitWith {diag_log "<ApmsDB>: ERROR: Cannot create object. Object is null!";false};
private _serializedData = [_object, _objectType, _priority] call DB_fnc_serializeObject;
......
......@@ -8,7 +8,27 @@
* https://www.bistudio.com/community/licenses/arma-public-license-share-alike/
* https://www.bistudio.com/monetization/
*/
/*
DESCRIPTION:
This function is used to register character to DB. Without this the character data wont be saved to DB.
PARAMS:
1 - OBJECT: Object to be registerd.
USAGE:
[_player] call DB_fnc_registerCharacter;
// Register new character to DB automatically
player addEventHandler ["Respawn",{
params ["_newUnit","_corpse"];
[_newUnit] remoteExec ["DB_fnc_registerCharacter",2];
}];
RETURNS:
TODO
*/
#include "\ApmsDB\constants.hpp"
params[["_playerObj",objNull,[objNull]]];
......@@ -16,7 +36,6 @@ params[["_playerObj",objNull,[objNull]]];
if(isNull _playerObj) exitWith {diag_log "<ApmsDB>: ERROR: Cannot create character. Player object is null!"};
private _data = [];
private _playerUUID = _playerObj getVariable ["pUUID",""];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment