Jump to content
  • 0

Expherion

Question

Hello!!!

I need some help, does anyone have a Capture Point script that is functioning on 1.0.6?  The owner of the server desperately wants a Capture point style event where players must brawl for control over an area for around 10,15 minutes, then a crate spawns, granted players are in the vicinity, and if they are not in the vicinity, the crate is empty.  If someone is willing to share this script or has it for a reasonable price (keep in mind my organization is not for profit), then I would be highly appreciative and so would the community!!! Please help a fellow out!  

 

Thanks in advance!!! 

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

@Expherion  here you got one that i wrote with @iben  for my deathmatch mod.

Thers no crate spawns at the end.. but you can add one very easy.  (Players wins money every 60 seconds for hold the position)

player_deathmatch_enter.sqf

Spoiler

private ["_playercount","_txt","_cntMax","_step","_baseReward","_useBannedWeps","_bannedWeps","_depositMoney","_fn_SC_uniCoins","_cnt","_timeReward","_msg","_curWep","_inVehicle","_done","_excluded","_coins","_vehicle"];

// === User config:
_cntMax        = 8;        // max 8 - how many cycles?
_step          = 60;        // for delay between another reward cycle
_baseReward    = 500;      // base money for one cycle, next cycle = _baseReward * (_cnt + 1)
_depositMoney = "cache"; // "bank" use only if _fn_SC_uniCoins = true
_fn_SC_uniCoins = true; //Need fn_SC_uniCoins //false uses standar salival way//
// === User config END


 if (typeOf player isKindOf "PZombie_VB") exitWith {
				  
                 systemchat ("<ANTIHACK>:cannot win money while youre a zed");
                  };

/////////////////DO NOT TOUCH
_cnt = 1;
_timeReward = _cnt * _baseReward;
_msg = format ["Nice! You gain %1 %2...",[_timeReward] call BIS_fnc_numberText,CurrencyName];
_done = false;
////////////////////



// === START
systemchat ("Hold Position To win Money every 60seconds");
_playercount = (({isPlayer _x } count (getPos vehicle player nearEntities[['AllVehicles'], 120])) - 1);

uiSleep 0.5;

if (_playercount == 0) then {
_txt = "<img image='scripts\newhud\gui\server.paa' /><br/><t size='0.7' color='#23e143' align='center'>DEATHMATCH ZONE</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;   
}else{
_txt = "<img image='scripts\newhud\gui\server.paa' /><br/><t size='0.7' color='#ea2828' align='center'>DEATHMATCH ZONE</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;

};

uiSleep _step; // Wait for first Reward
// ===


while {!_done} do {
  if (_cnt < _cntMax) then {
  
    if (_fn_SC_uniCoins) then {
     [player,_timeReward,"add",_depositMoney] call fnc_SC_uniCoins;
    } else {
      _coins = player getVariable [Z_moneyVariable,0];
      _coins = _coins + _timeReward;
      player setVariable[Z_moneyVariable,_coins,true];
    };
  };

uiSleep _step;
_cnt = _cnt + 1;
systemChat _msg;
playsound "msg";
_done = _cnt >= _cntMax;

};

// Exit script if conditions are not met
if (_done) exitWith {
_txt = "<br/><t size='0.5' color='#4cea28' align='center'>NICE!HOLD POSITION IS OVER... YOU DID IT!</t>";
[_txt, [safezoneX, safezoneW], [0.10 * safezoneH + safezoneY, 0.2 * safezoneH], 5, 0.5] spawn BIS_fnc_dynamicText;
  systemChat "Leave the area and enter again to win more money";
};


// === END

 

player_deathmatch_leave.sqf

Spoiler

private ["_txt"];
_txt = "<br/><t size='0.7' color='#eaa728' align='center'>LEAVING DEATHMATCH ZONE!</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;

 

 

mission.sqm  (use this file to set a pos and ratio where this area is located)

Spoiler

class Sensors
	{
		items=1;
#define TRGDEF a=100;b=100;activationBy="ANY";repeating=1;interruptable=1;age="UNKNOWN";class Effects{};
		
		
     class Item0
        {
            position[]={3412.77,0, 3929.4153};
            TRGDEF
            name="zonebf";
            expCond="(vehicle player) in thislist;";
            expActiv="zonebf = [] execVM ""scripts\others\player_deathmatch_enter.sqf"";";
            expDesactiv="terminate zonebf; [] execVM ""scripts\others\player_deathmatch_leave.sqf"";";
            
        };
};

 

 

 

heres another variant that i wrote for nuclear wars.. wheres the script spawns waves of 3 enemy ai.

bandits.sqf

Spoiler

private ["_playercount","_txt","_cntMax","_step","_baseReward","_useBannedWeps","_bannedWeps","_depositMoney","_fn_SC_uniCoins","_cnt","_timeReward","_msg","_curWep","_inVehicle","_done","_excluded","_coins","_vehicle"];
_cntMax        = 3;      
_stepa = 5;
_step          = 60;        
_cnt = 1;
_done = false;
//_playercount = (({isPlayer _x } count (getPos vehicle player nearEntities[['AllVehicles'], 50])) - 1);


uiSleep 0.5;

_txt = "<img image='scripts\newhud\gui\server.paa' /><br/><t size='0.7' color='#ea2828' align='center'>WARNING BANDIT ZONE</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;

systemchat "Warning Radioactive Zone";
//if (_playercount > 0) exitWith {};




uiSleep _stepa; // Wait for first Reward
// ===


while {!_done} do {
  if (_cnt < _cntMax) then {
systemchat "Bandits Comming";
_rewards= ["MortarBucket","ItemBloodbag","ItemAntibiotic","ItemTent","ItemMixOil","ItemSandbag","ItemSilverBar10oz"]call BIS_fnc_selectRandom;
_d = [50,55,60] call BIS_fnc_selectRandom;
_r = random 360;
_WaveSpawnLocation = [((getpos player) select 0) + sin _r *_d, ((getpos player) select 1) + cos _r *_d, 0]; 
wavegroup1 = [_WaveSpawnLocation, EAST, ["TK_INS_Soldier_EP1","TK_INS_Soldier_EP1", "TK_INS_Soldier_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
		{
		_x doMove position player;
                       _x setBehaviour "COMBAT";
					   _x setCombatMode "RED";
					   removeAllWeapons _x;
                       removeAllItems _x;
					  _x addMagazine _rewards;
					  _x addMagazine "17Rnd_9x19_glock17";
					  _x addMagazine "17Rnd_9x19_glock17";
                      _x addWeapon "G17_DZ";
					  
		} foreach units wavegroup1;
		 diag_log ("SPAWN BANDIT WAVE");
};




uiSleep _step;

_cnt = _cnt + 1;

_done = _cnt >= _cntMax;
};

 

 

Link to comment
Share on other sites

  • 0
3 hours ago, juandayz said:

@Expherion  here you got one that i wrote with @iben  for my deathmatch mod.

Thers no crate spawns at the end.. but you can add one very easy.  (Players wins money every 60 seconds for hold the position)

player_deathmatch_enter.sqf

  Hide contents


private ["_playercount","_txt","_cntMax","_step","_baseReward","_useBannedWeps","_bannedWeps","_depositMoney","_fn_SC_uniCoins","_cnt","_timeReward","_msg","_curWep","_inVehicle","_done","_excluded","_coins","_vehicle"];

// === User config:
_cntMax        = 8;        // max 8 - how many cycles?
_step          = 60;        // for delay between another reward cycle
_baseReward    = 500;      // base money for one cycle, next cycle = _baseReward * (_cnt + 1)
_depositMoney = "cache"; // "bank" use only if _fn_SC_uniCoins = true
_fn_SC_uniCoins = true; //Need fn_SC_uniCoins //false uses standar salival way//
// === User config END


 if (typeOf player isKindOf "PZombie_VB") exitWith {
				  
                 systemchat ("<ANTIHACK>:cannot win money while youre a zed");
                  };

/////////////////DO NOT TOUCH
_cnt = 1;
_timeReward = _cnt * _baseReward;
_msg = format ["Nice! You gain %1 %2...",[_timeReward] call BIS_fnc_numberText,CurrencyName];
_done = false;
////////////////////



// === START
systemchat ("Hold Position To win Money every 60seconds");
_playercount = (({isPlayer _x } count (getPos vehicle player nearEntities[['AllVehicles'], 120])) - 1);

uiSleep 0.5;

if (_playercount == 0) then {
_txt = "<img image='scripts\newhud\gui\server.paa' /><br/><t size='0.7' color='#23e143' align='center'>DEATHMATCH ZONE</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;   
}else{
_txt = "<img image='scripts\newhud\gui\server.paa' /><br/><t size='0.7' color='#ea2828' align='center'>DEATHMATCH ZONE</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;

};

uiSleep _step; // Wait for first Reward
// ===


while {!_done} do {
  if (_cnt < _cntMax) then {
  
    if (_fn_SC_uniCoins) then {
     [player,_timeReward,"add",_depositMoney] call fnc_SC_uniCoins;
    } else {
      _coins = player getVariable [Z_moneyVariable,0];
      _coins = _coins + _timeReward;
      player setVariable[Z_moneyVariable,_coins,true];
    };
  };

uiSleep _step;
_cnt = _cnt + 1;
systemChat _msg;
playsound "msg";
_done = _cnt >= _cntMax;

};

// Exit script if conditions are not met
if (_done) exitWith {
_txt = "<br/><t size='0.5' color='#4cea28' align='center'>NICE!HOLD POSITION IS OVER... YOU DID IT!</t>";
[_txt, [safezoneX, safezoneW], [0.10 * safezoneH + safezoneY, 0.2 * safezoneH], 5, 0.5] spawn BIS_fnc_dynamicText;
  systemChat "Leave the area and enter again to win more money";
};


// === END

 

player_deathmatch_leave.sqf

  Hide contents


private ["_txt"];
_txt = "<br/><t size='0.7' color='#eaa728' align='center'>LEAVING DEATHMATCH ZONE!</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;

 

 

mission.sqm  (use this file to set a pos and ratio where this area is located)

  Hide contents


class Sensors
	{
		items=1;
#define TRGDEF a=100;b=100;activationBy="ANY";repeating=1;interruptable=1;age="UNKNOWN";class Effects{};
		
		
     class Item0
        {
            position[]={3412.77,0, 3929.4153};
            TRGDEF
            name="zonebf";
            expCond="(vehicle player) in thislist;";
            expActiv="zonebf = [] execVM ""scripts\others\player_deathmatch_enter.sqf"";";
            expDesactiv="terminate zonebf; [] execVM ""scripts\others\player_deathmatch_leave.sqf"";";
            
        };
};

 

 

 

heres another variant that i wrote for nuclear wars.. wheres the script spawns waves of 3 enemy ai.

bandits.sqf

  Hide contents


private ["_playercount","_txt","_cntMax","_step","_baseReward","_useBannedWeps","_bannedWeps","_depositMoney","_fn_SC_uniCoins","_cnt","_timeReward","_msg","_curWep","_inVehicle","_done","_excluded","_coins","_vehicle"];
_cntMax        = 3;      
_stepa = 5;
_step          = 60;        
_cnt = 1;
_done = false;
//_playercount = (({isPlayer _x } count (getPos vehicle player nearEntities[['AllVehicles'], 50])) - 1);


uiSleep 0.5;

_txt = "<img image='scripts\newhud\gui\server.paa' /><br/><t size='0.7' color='#ea2828' align='center'>WARNING BANDIT ZONE</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;

systemchat "Warning Radioactive Zone";
//if (_playercount > 0) exitWith {};




uiSleep _stepa; // Wait for first Reward
// ===


while {!_done} do {
  if (_cnt < _cntMax) then {
systemchat "Bandits Comming";
_rewards= ["MortarBucket","ItemBloodbag","ItemAntibiotic","ItemTent","ItemMixOil","ItemSandbag","ItemSilverBar10oz"]call BIS_fnc_selectRandom;
_d = [50,55,60] call BIS_fnc_selectRandom;
_r = random 360;
_WaveSpawnLocation = [((getpos player) select 0) + sin _r *_d, ((getpos player) select 1) + cos _r *_d, 0]; 
wavegroup1 = [_WaveSpawnLocation, EAST, ["TK_INS_Soldier_EP1","TK_INS_Soldier_EP1", "TK_INS_Soldier_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
		{
		_x doMove position player;
                       _x setBehaviour "COMBAT";
					   _x setCombatMode "RED";
					   removeAllWeapons _x;
                       removeAllItems _x;
					  _x addMagazine _rewards;
					  _x addMagazine "17Rnd_9x19_glock17";
					  _x addMagazine "17Rnd_9x19_glock17";
                      _x addWeapon "G17_DZ";
					  
		} foreach units wavegroup1;
		 diag_log ("SPAWN BANDIT WAVE");
};




uiSleep _step;

_cnt = _cnt + 1;

_done = _cnt >= _cntMax;
};

 

 

Is there a way to make this work when a certain epoch event is called?

Link to comment
Share on other sites

  • 0
Just now, Hooty said:

Is there a way to make this work when a certain epoch event is called?

Yes just define a gloval variable as false in your custom variables.sqf and chang. e it by true with the event.. then put at top of the script a condition.. like waituntil {xvariable};

Or if (xvariable) then {};

 

 

Link to comment
Share on other sites

  • 0

For example i use dynamics safezones in nuclear wars mod.  With the event spawn a trader AI. and in a custom player_traderCity.sqf at top i add this condition:

_playerPos = getPos player;
_neartrader = count nearestObjects [_playerPos, ["RU_Priest","Profiteer4"], 100] >0;

if (!_neartrader) exitWith{};

 

then if player enter to the safezone and thers no RU_Priest or Profiteer4..  thers no safezone script.  but when the event spawns the traders then the safezones are enabled.

Link to comment
Share on other sites

  • 0
13 minutes ago, juandayz said:

For example i use dynamics safezones in nuclear wars mod.  With the event spawn a trader AI. and in a custom player_traderCity.sqf at top i add this condition:


_playerPos = getPos player;
_neartrader = count nearestObjects [_playerPos, ["RU_Priest","Profiteer4"], 100] >0;

if (!_neartrader) exitWith{};

 

then if player enter to the safezone and thers no RU_Priest or Profiteer4..  thers no safezone script.  but when the event spawns the traders then the safezones are enabled.

Would this work with a building as well I assume it would. 

Link to comment
Share on other sites

  • 0
Spoiler

private ["_loot","_txt","_cntMax","_step","_loot2","_loot3","_loot4","_loot_lists","_boxtype","_cnt","_playerPos","_box","_curWep","_inVehicle","_done","_excluded","_coins","_vehicle"];
_cntMax        = 2;      
_stepa = 5;
_step          = 160;        
_cnt = 1;
_done = false;


_loot_lists = [
[
["ChainSawR","ItemSledge","ItemPickaxe"],
["MortarBucket","MortarBucket","bulk_ItemSodaCokeFull","bulk_ItemWire","bulk_PartGeneric","PartPlywoodPack","PartPlankPack","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","PartGeneric"]
],
[
["ItemKeyKit"],
["ItemAntibiotic","ItemBandage","ItemAntibacterialWipe","ItemMorphine","ItemPainkiller","equip_string","equip_gauze","equip_gauzepackaged","equip_rag","equip_herb_box","ItemGoldBar10oz"]
],
[
["ItemHatchet","ItemMachete","ItemPickaxe","ItemSledge"],
["ItemRuby","ItemMixOil","plot_pole_kit","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz"]
],
[
["ChainSaw"],
["ItemDesertTent","ItemGenerator","equip_brick","equip_duct_tape","equip_rope","equip_hose","equip_lever","equip_nails","equip_metal_sheet","equip_1inch_metal_pipe","equip_2inch_metal_pipe","ItemWire","ItemTankTrap","ItemCorrugated","ItemPole"]
],
[
["MP5_DZ"],
["ItemComboLock","ItemVault","ItemLockBox"]
],
[
["DMR_DZ"],
["ItemAntibiotic","ItemAntibacterialWipe","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR"]
],
[
["m107_DZ"],
["10Rnd_127x99_m107","10Rnd_127x99_m107","50Rnd_127x107_DSHKM","MortarBucket","MortarBucket","MortarBucket","MortarBucket","MortarBucket","MortarBucket","transfusionKit","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],

[
["SVD_DZ"],
["PartWheel","PartWheel","PartWheel","PartGlass","PartGlass","PartGlass","PartEngine","PartEngine","PartVRotor","PartVRotor","PartFueltank","PartFueltank","ItemFuelcan","ItemFuelcan","ItemJerrycan","ItemJerrycan","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;
_loot3 = _loot_lists call BIS_fnc_selectRandom;
_loot4 = _loot_lists call BIS_fnc_selectRandom;
_boxtype = "USOrdnanceBox";



uiSleep 0.5;
_txt = "<br/><t size='0.7' color='#ea2828' align='center'>CAPTURE POINT AREA</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;


uiSleep _stepa; // Wait for first Reward
// ===


while {!_done} do {
if (_cnt < _cntMax) then {

uiSleep _step;
_cnt = _cnt + 1;
_done = _cnt >= _cntMax;
};
};
if (_done) exitWith {
_txt = "<br/><t size='0.5' color='#4cea28' align='center'>NICE!HOLD POSITION IS OVER... YOU DID IT!</t>";
[_txt, [safezoneX, safezoneW], [0.10 * safezoneH + safezoneY, 0.2 * safezoneH], 5, 0.5] spawn BIS_fnc_dynamicText;

_playerPos = getPos player;
_box = _boxtype createVehicle _playerPos;
clearweaponcargoglobal _box;
clearmagazinecargoglobal _box;

{
_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
{
_box addWeaponCargoGlobal [_x,1];
} forEach (_loot3 select 0);
{
_box addMagazineCargoGlobal [_x,1];
} forEach (_loot4 select 1);
};

 

 

Link to comment
Share on other sites

  • 0
Just now, juandayz said:
  Hide contents


private ["_loot","_txt","_cntMax","_step","_loot2","_loot3","_loot4","_loot_lists","_boxtype","_cnt","_playerPos","_box","_curWep","_inVehicle","_done","_excluded","_coins","_vehicle"];
_cntMax        = 2;      
_stepa = 5;
_step          = 160;        
_cnt = 1;
_done = false;


_loot_lists = [
[
["ChainSawR","ItemSledge","ItemPickaxe"],
["MortarBucket","MortarBucket","bulk_ItemSodaCokeFull","bulk_ItemWire","bulk_PartGeneric","PartPlywoodPack","PartPlankPack","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","PartGeneric"]
],
[
["ItemKeyKit"],
["ItemAntibiotic","ItemBandage","ItemAntibacterialWipe","ItemMorphine","ItemPainkiller","equip_string","equip_gauze","equip_gauzepackaged","equip_rag","equip_herb_box","ItemGoldBar10oz"]
],
[
["ItemHatchet","ItemMachete","ItemPickaxe","ItemSledge"],
["ItemRuby","ItemMixOil","plot_pole_kit","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz"]
],
[
["ChainSaw"],
["ItemDesertTent","ItemGenerator","equip_brick","equip_duct_tape","equip_rope","equip_hose","equip_lever","equip_nails","equip_metal_sheet","equip_1inch_metal_pipe","equip_2inch_metal_pipe","ItemWire","ItemTankTrap","ItemCorrugated","ItemPole"]
],
[
["MP5_DZ"],
["ItemComboLock","ItemVault","ItemLockBox"]
],
[
["DMR_DZ"],
["ItemAntibiotic","ItemAntibacterialWipe","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR"]
],
[
["m107_DZ"],
["10Rnd_127x99_m107","10Rnd_127x99_m107","50Rnd_127x107_DSHKM","MortarBucket","MortarBucket","MortarBucket","MortarBucket","MortarBucket","MortarBucket","transfusionKit","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
],

[
["SVD_DZ"],
["PartWheel","PartWheel","PartWheel","PartGlass","PartGlass","PartGlass","PartEngine","PartEngine","PartVRotor","PartVRotor","PartFueltank","PartFueltank","ItemFuelcan","ItemFuelcan","ItemJerrycan","ItemJerrycan","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"]
]
];
_loot = _loot_lists call BIS_fnc_selectRandom;
_loot2 = _loot_lists call BIS_fnc_selectRandom;
_loot3 = _loot_lists call BIS_fnc_selectRandom;
_loot4 = _loot_lists call BIS_fnc_selectRandom;
_boxtype = "USOrdnanceBox";



uiSleep 0.5;
_txt = "<br/><t size='0.7' color='#ea2828' align='center'>CAPTURE POINT AREA</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;


uiSleep _stepa; // Wait for first Reward
// ===


while {!_done} do {
if (_cnt < _cntMax) then {

uiSleep _step;
_cnt = _cnt + 1;
_done = _cnt >= _cntMax;
};
};
if (_done) exitWith {
_txt = "<br/><t size='0.5' color='#4cea28' align='center'>NICE!HOLD POSITION IS OVER... YOU DID IT!</t>";
[_txt, [safezoneX, safezoneW], [0.10 * safezoneH + safezoneY, 0.2 * safezoneH], 5, 0.5] spawn BIS_fnc_dynamicText;

_playerPos = getPos player;
_box = _boxtype createVehicle _playerPos;
clearweaponcargoglobal _box;
clearmagazinecargoglobal _box;

{
_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_box addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
{
_box addWeaponCargoGlobal [_x,1];
} forEach (_loot3 select 0);
{
_box addMagazineCargoGlobal [_x,1];
} forEach (_loot4 select 1);
};

 

 

so for test it i just need add a class sensor in my mission.sqm  for example in my phantera map:

class Item11
        {
            position[]={3807,0,7661};
            TRGDEF
            name="zonebf";
            expCond="(vehicle player) in thislist;";
            expActiv="zonebf = [] execVM ""scripts\capturePoint.sqf"";";
            expDesactiv="terminate zonebf;";
            
        };

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...