Created
March 8, 2017 01:37
-
-
Save worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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