Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
_humanity = _primary select 5;
_playerObj setVariable["CharacterID",_characterID,true];
_playerObj setVariable["humanity",_humanity,true];
_playerObj setVariable["humanity_CHK",_humanity];
_stats = _primary select 2;
if (count _stats > 0) then {
//register stats
_playerObj setVariable["zombieKills",(_stats select 0),true];
_playerObj setVariable["headShots",(_stats select 1),true];
_playerObj setVariable["humanKills",(_stats select 2),true];
_playerObj setVariable["banditKills",(_stats select 3),true];
_playerObj addScore (_stats select 1);
//Save Score
_score = score _playerObj;
_playerObj addScore ((_stats select 0) - _score);
//record for Server JIP checks
_playerObj setVariable["zombieKills_CHK",(_stats select 0)];
_playerObj setVariable["headShots_CHK",(_stats select 1)];
_playerObj setVariable["humanKills_CHK",(_stats select 2)];
_playerObj setVariable["banditKills_CHK",(_stats select 3)];
I forgot humanity stays I see what I can come up withso this sets the new humanity:
Code:_humanity = _primary select 5;
Code:_playerObj setVariable["CharacterID",_characterID,true]; _playerObj setVariable["humanity",_humanity,true]; _playerObj setVariable["humanity_CHK",_humanity];
and this is for the kills:
Code:_stats = _primary select 2;
Code:if (count _stats > 0) then { //register stats _playerObj setVariable["zombieKills",(_stats select 0),true]; _playerObj setVariable["headShots",(_stats select 1),true]; _playerObj setVariable["humanKills",(_stats select 2),true]; _playerObj setVariable["banditKills",(_stats select 3),true]; _playerObj addScore (_stats select 1); //Save Score _score = score _playerObj; _playerObj addScore ((_stats select 0) - _score); //record for Server JIP checks _playerObj setVariable["zombieKills_CHK",(_stats select 0)]; _playerObj setVariable["headShots_CHK",(_stats select 1)]; _playerObj setVariable["humanKills_CHK",(_stats select 2)]; _playerObj setVariable["banditKills_CHK",(_stats select 3)];
so i just edited it so it called right after the humanity but still everything 0
Think it should be done somehow with _stats select 0 but just dont know how -.-"
i appreciate any help
so you have an array listed, like so.I'm terrible with "this select X;"
_array = ["vil_Glock","ItemBandage","DZ_Patrol_Pack_EP1","FoodCanBakedBeans","ItemMatchbox_DZE","ItemPainkiller"] execVM "yourscripthere.sqf";
_secondary = _this select 0;
_bandaid = _this select 1;
_bpack = _this select 2;
_food = _this select 3;
_matches = _this select 4;
_pills = _this select 5;
_stats = _primary select 2;
if (count _stats > 0) then {
//register stats
_playerObj setVariable["zombieKills",(_stats select 0),true];
_playerObj setVariable["headShots",(_stats select 1),true];
_playerObj setVariable["humanKills",(_stats select 2),true];
_playerObj setVariable["banditKills",(_stats select 3),true];
_playerObj addScore (_stats select 1);
server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";
"PVDZE_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
"PVDZE_plr_Login2 = [_charID,player,_playerUID];" \n
"publicVariableServer ""PVDZE_plr_Login2"";" \n
PVDZE_plr_Login2 = nil;