mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
Organize files a bit and removed non source pbo's
This commit is contained in:
31
SQF/dayz_code/compile/local_gutObject.sqf
Normal file
31
SQF/dayz_code/compile/local_gutObject.sqf
Normal file
@@ -0,0 +1,31 @@
|
||||
private["_animalbody","_qty","_rawfoodtype","_ehLoc"];
|
||||
_animalbody = _this select 0;
|
||||
_qty = _this select 1;
|
||||
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> typeOf _animalbody >> "rawfoodtype");
|
||||
|
||||
if (local _animalbody) then {
|
||||
for "_x" from 1 to _qty do {
|
||||
_animalbody addMagazine _rawfoodtype;
|
||||
};
|
||||
|
||||
[time, _animalbody] spawn {
|
||||
private ["_timer", "_body"];
|
||||
_timer = _this select 0;
|
||||
_body = _this select 1;
|
||||
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
||||
sleep 5;
|
||||
};
|
||||
//["dayzHideBody",_body] call broadcastRpcCallAll;
|
||||
dayzHideBody = _body;
|
||||
hideBody _body; // local player
|
||||
publicVariable "dayzHideBody"; // remote player
|
||||
sleep 5;
|
||||
deleteVehicle _body;
|
||||
true;
|
||||
};
|
||||
|
||||
} else {
|
||||
_ehLoc = "client";
|
||||
if (isServer) then { _ehLoc = "server"; };
|
||||
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_animalbody)];
|
||||
};
|
||||
Reference in New Issue
Block a user