mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
Update compiles - 2 more files to do
fn_selfActions.sqf player_updateGui.sqf
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
private ["_updates","_playerUID","_charID","_humanity","_worldspace","_model","_friendlies","_fractures","_old","_medical","_zombieKills","_headShots","_humanKills","_banditKills","_tagList"];
|
||||
_playerUID = _this select 0;
|
||||
_charID = _this select 1;
|
||||
_model = _this select 2;
|
||||
private ["_charID","_newmodel","_old","_updates","_humanity","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_banditKills","_fractures","_wpnType","_ismelee"];
|
||||
//_playerUID = _this select 0;
|
||||
_charID = _this select 1;
|
||||
_model = _this select 2;
|
||||
|
||||
_old = player;
|
||||
player allowDamage false;
|
||||
@@ -11,23 +11,24 @@ player removeEventHandler ["HandleDamage",mydamage_eh1];
|
||||
player removeEventHandler ["Killed",mydamage_eh3];
|
||||
player removeEventHandler ["Fired",mydamage_eh2];
|
||||
|
||||
_updates = player getVariable["updatePlayer",[false,false,false,false,false]];
|
||||
_updates = player getVariable["updatePlayer",[false,false,false,false,false]];
|
||||
_updates set [0,true];
|
||||
player setVariable["updatePlayer",_updates,true];
|
||||
dayz_unsaved = true;
|
||||
//Logout
|
||||
_humanity = player getVariable["humanity",0];
|
||||
_medical = player call player_sumMedical;
|
||||
_worldspace = [round(direction player),getPosATL player];
|
||||
_zombieKills = player getVariable ["zombieKills",0];
|
||||
_headShots = player getVariable ["headShots",0];
|
||||
_humanKills = player getVariable ["humanKills",0];
|
||||
_banditKills = player getVariable ["banditKills",0];
|
||||
_friendlies = player getVariable ["friendlies",[]];
|
||||
_tagList = player getVariable ["tagList",[]];
|
||||
_humanity = player getVariable["humanity",0];
|
||||
_medical = player call player_sumMedical;
|
||||
_worldspace = [round(direction player),getPosATL player];
|
||||
_zombieKills = player getVariable ["zombieKills",0];
|
||||
_headShots = player getVariable ["headShots",0];
|
||||
_humanKills = player getVariable ["humanKills",0];
|
||||
_banditKills = player getVariable ["banditKills",0];
|
||||
|
||||
_achievements = player getVariable ["Achievements",[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];
|
||||
|
||||
//Switch
|
||||
_model call player_switchModel;
|
||||
_switch = _model spawn player_switchModel;
|
||||
waitUntil { scriptDone _switch };
|
||||
|
||||
//Login
|
||||
|
||||
@@ -42,15 +43,21 @@ if (count _medical > 0) then {
|
||||
player setVariable["USEC_lowBlood",(_medical select 6),true];
|
||||
player setVariable["USEC_BloodQty",(_medical select 7),true];
|
||||
player setVariable["unconsciousTime",(_medical select 10),true];
|
||||
|
||||
|
||||
player setVariable["blood_type",(_medical select 11),true];
|
||||
player setVariable["rh_factor",(_medical select 12),true];
|
||||
player setVariable["messing",(_medical select 13),true];
|
||||
player setVariable["blood_testdone",(_medical select 14),true];
|
||||
|
||||
//Add Wounds
|
||||
{
|
||||
player setVariable[_x,true,true];
|
||||
//["usecBleed",[player,_x,_hit]] call broadcastRpcCallAll;
|
||||
usecBleed = [player,_x,0];
|
||||
publicVariable "usecBleed";
|
||||
} count (_medical select 8);
|
||||
|
||||
//diag_log format ["loop _x:1 wound:%2",_x, (USEC_typeOfWounds select _forEachIndex)];
|
||||
player setVariable["hit_"+_x,true,true];
|
||||
PVDZ_hlt_Bleed = [player, _x, 1];
|
||||
publicVariable "PVDZ_hlt_Bleed";
|
||||
} forEach (_medical select 8);
|
||||
|
||||
|
||||
//Add fractures
|
||||
_fractures = (_medical select 9);
|
||||
// player setVariable ["hit_legs",(_fractures select 0),true];
|
||||
@@ -62,7 +69,7 @@ if (count _medical > 0) then {
|
||||
player setVariable ["hit_legs",0,true];
|
||||
player setVariable ["hit_hands",0,true];
|
||||
player setVariable ["USEC_injured",false,true];
|
||||
player setVariable ["USEC_inPain",false,true];
|
||||
player setVariable ["USEC_inPain",false,true];
|
||||
};
|
||||
|
||||
|
||||
@@ -72,13 +79,15 @@ player setVariable["zombieKills",_zombieKills,true];
|
||||
player setVariable["headShots",_headShots,true];
|
||||
player setVariable["humanKills",_humanKills,true];
|
||||
player setVariable["banditKills",_banditKills,true];
|
||||
player setVariable["characterID",_charID,true];
|
||||
player setVariable["worldspace",_worldspace];
|
||||
player setVariable["Achievements",_achievements];
|
||||
player setVariable["CharacterID",_charID,true];
|
||||
player setVariable["worldspace",_worldspace,true];
|
||||
player setVariable["friendlies",_friendlies,true];
|
||||
player setVariable["tagList",_tagList,true];
|
||||
|
||||
//code for this on the server is missing
|
||||
//["PVDZE_plr_Morph",[_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity]] call callRpcProcedure;
|
||||
PVDZ_serverStoreVar = [player,"Achievements",_achievements];
|
||||
publicVariableServer "PVDZ_serverStoreVar";
|
||||
|
||||
call dayz_resetSelfActions;
|
||||
|
||||
@@ -88,18 +97,10 @@ eh_player_killed = player addeventhandler ["FiredNear",{_this call player_weapon
|
||||
player allowDamage true;
|
||||
|
||||
player addWeapon "Loot";
|
||||
player addWeapon "Flare";
|
||||
|
||||
//melee check
|
||||
_wpnType = primaryWeapon player;
|
||||
_ismelee = (gettext (configFile >> "CfgWeapons" >> _wpnType >> "melee"));
|
||||
if (_ismelee == "true") then {
|
||||
call dayz_meleeMagazineCheck;
|
||||
};
|
||||
|
||||
uiSleep 0.1;
|
||||
//melee check
|
||||
call dayz_meleeMagazineCheck;
|
||||
|
||||
if (!isNull _old) then {
|
||||
// this should not be needed as player is deleted in player_switchModel?
|
||||
deleteVehicle _old;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
if !(isNull _old) then {deleteVehicle _old;};
|
||||
Reference in New Issue
Block a user