Files
DayZ-Epoch/SQF/dayz_code/actions/pickupActions/object_pickupAction.sqf
AirwavesMan 57276dd61f Revert object_pickupAction back to execVM
I was not aware of the acutal behavior of the init eventHandler. The init eventhandler sends all the given arguments to the player before the mpframework got even load on the player, so it is basicly the same like the publicvariables. This means that the function object_pickupAction will be always nil because it gets defined far later after the init evenhandler fired already.
2020-10-14 21:09:57 +02:00

23 lines
784 B
Plaintext

if (isServer || {player isKindOf "PZombie_VB"}) exitWith {};
/*
Created exclusively for ArmA2:OA - DayZMod.
Please request permission to use/alter from R4Z0R49.
*/
private["_holder","_type","_classname","_name"];
_holder = _this select 0;
_type = _this select 1;
_classname = _this select 2;
_name = getText (configFile >> _type >> _classname >> "displayName");
pickupInit = true;
if (_classname == "1Rnd_Arrow_Wood") then {
[_holder,_type,_classname,_name] execVM "\z\addons\dayz_code\actions\pickupActions\actionMonitor.sqf";
} else {
s_player_holderPickup = _holder addAction [format[(localize "str_init_take"),_name], "\z\addons\dayz_code\actions\pickupActions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
player reveal _holder;
pickupInit = true;
};