if (!isNil "life_action_spikeStripPickup") exitWith {hint localize "STR_ISTR_SpikesDeployment"}; // avoid conflicts with addactions allowing duplication.
life_action_spikeStripPickup = player addAction[localize "STR_ISTR_Spike_Pack",life_fnc_packupSpikes,"",0,false,false,"",
' _spikes = nearestObjects[getPos player,["Land_Razorwire_F"],8] select 0; !isNil "_spikes" && !isNil {(_spikes getVariable "item")}'];
if (isNil "life_action_spikeStripPickup") then {
life_action_spikeStripPickup = player addAction[localize...
_spikeStrip setDamage 1;
Merci ça fonctionne!Salut ! Bien sûr
Il faut retirer cette ligne dans ton fn_spikeStrip.sqf (côté mission) :
Code:_spikeStrip setDamage 1;
if (!isNil "life_action_spikeStripPickup") exitWith {hint localize "STR_ISTR_SpikesDeployment"}; // avoid conflicts with addactions allowing duplication.
life_action_spikeStripPickup = player addAction[localize "STR_ISTR_Spike_Pack",life_fnc_packupSpikes,"",0,false,false,"",
' _spikes = nearestObjects[getPos player,["Land_Razorwire_F"],8] select 0; !isNil "_spikes" && !isNil {(_spikes getVariable "item")}'];
if (isNil "life_action_spikeStripPickup") then {
life_action_spikeStripPickup = player addAction[localize "STR_ISTR_Spike_Pack",life_fnc_packupSpikes,"",0,false,false,"",
' _spikes = nearestObjects[getPos player,["Land_Razorwire_F"],8] select 0; !isNil "_spikes" && !isNil {(_spikes getVariable "item")}'];
};
player removeAction life_action_spikeStripPickup;
life_action_spikeStripPickup = nil;