mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 09:32:02 +03:00
sync with DayZ 1.7.4 CE
This commit is contained in:
@@ -4,12 +4,20 @@ _caller = _this select 1;
|
||||
_id = _this select 2;
|
||||
_params = _this select 3;
|
||||
_pos = position _target;
|
||||
_hasRawMeat = "FoodSteakRaw" in magazines player;
|
||||
_hasdog = player getVariable ["dogid", "false"];
|
||||
|
||||
deleteVehicle (_this select 0);
|
||||
_dog = (group player) createUnit [format["DZ_%1", typeOf _target], _pos, [], 0, "FORM"];
|
||||
_dog disableAI "FSM";
|
||||
_fsmid = [_dog, (count units group _caller)] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
|
||||
_fsmid setFSMVariable ["_handle", _fsmid];
|
||||
_target removeAction _id;
|
||||
if ((_hasRawMeat) && (_hasdog == "false")) then {
|
||||
player removeMagazine "FoodSteakRaw";
|
||||
deleteVehicle (_this select 0);
|
||||
_dog = (group player) createUnit [typeOf _target, _pos, [], 0, "FORM"];
|
||||
player setvariable ["dogid", _fsmid];
|
||||
_dog disableAI "FSM";
|
||||
_fsmid = [_dog, typeOf _target] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
|
||||
_fsmid setFSMVariable ["_handle", _fsmid];
|
||||
_target removeAction _id;
|
||||
} else {
|
||||
cutText ["You must have RawMeat", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
//handle publicVariables here later.
|
||||
|
||||
Reference in New Issue
Block a user