Skip to content

Instantly share code, notes, and snippets.

@worldwidesorrow
Created March 8, 2017 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a to your computer and use it in GitHub Desktop.
Save worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a to your computer and use it in GitHub Desktop.
execVM "\z\addons\dayz_server\bankzones\banks.sqf";
"PVDZE_bank_Save" addPublicVariableEventHandler {
_playerObj = ((_this select 1) select 0);
_playerID = getPlayerUID _playerObj;
_bankMoney = _playerObj getVariable ["bankMoney",0];
if(_playerID != "") then {
_key = format["CHILD:299:%1:%2:",_playerID,_bankMoney];
_key call server_hiveReadWrite;
};
};
"PVDZE_account_Doublecheck" addPublicVariableEventHandler {
_playerObj = ((_this select 1) select 0);
_playerID = getPlayerUID _playerObj;
_playerName = name _playerObj;
_doLoop = 0;
while {_doLoop < 3} do {
_key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
_primary = _key call server_hiveReadWrite;
if (count _primary > 0) then {
if ((_primary select 0) != "ERROR") then {
_doLoop = 9;
};
};
_doLoop = _doLoop + 1;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment