Standardize coin variables, prevent coins not refreshing on skin change. (#1904)

* Standardize coin variables, prevent coins not refreshing on skin change.

* Add missing commit
This commit is contained in:
oiad
2017-03-12 07:05:34 +13:00
committed by ebayShopper
parent 6871da6168
commit 2ec5390b70
4 changed files with 22 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
private ["_charID","_newmodel","_old","_updates","_humanity","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_combattimeout","_inCombat","_banditKills","_fractures","_wpnType","_ismelee","_coins"];
private ["_charID","_newmodel","_old","_updates","_humanity","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_combattimeout","_inCombat","_banditKills","_fractures","_wpnType","_ismelee","_coins","_bankCoins","_globalCoins"];
//_playerUID = _this select 0;
_charID = _this select 1;
_model = _this select 2;
@@ -29,7 +29,12 @@ _ConfirmedHumanKills = player getVariable ["ConfirmedHumanKills",0];
_ConfirmedBanditKills = player getVariable ["ConfirmedBanditKills",0];
_friendlies = player getVariable ["friendlies",[]];
_tagSetting = player getVariable ["DZE_display_name",false];
if (Z_SingleCurrency) then {_coins = player getVariable [Z_moneyVariable,0];};
if (Z_SingleCurrency) then {
_coins = player getVariable [Z_moneyVariable,0];
_bankCoins = player getVariable [Z_bankVariable,0];
_globalCoins = player getVariable [Z_globalVariable,0];
};
//Switch
_model call player_switchModel; //Already spawned thread, no need to spawn and waitUntil script is done
@@ -90,7 +95,12 @@ player setVariable ["ConfirmedHumanKills",_ConfirmedHumanKills,true];
player setVariable ["ConfirmedBanditKills",_ConfirmedBanditKills,true];
player setVariable ["friendlies",_friendlies,true];
player setVariable ["DZE_display_name",_tagSetting,true];
if (Z_SingleCurrency) then {player setVariable [Z_moneyVariable,_coins,true];};
if (Z_SingleCurrency) then {
player setVariable [Z_moneyVariable,_coins,true];
player setVariable [Z_bankVariable,_bankCoins,true];
player setVariable [Z_globalVariable,_globalCoins,true];
};
//PVDZ_serverStoreVar = [player,"Achievements",_achievements];
//publicVariableServer "PVDZ_serverStoreVar";