i got this code from http://opendayz.net/index.php?threads/hacker-boxes-medical-box.7349/page-2#post-15693
but it was in a .fsm format and i just wanted it into a sqf file
was wondering if anyone could help out why this isnt working
but it was in a .fsm format and i just wanted it into a sqf file
Code:
//hackerbox
[] spawn
{
while {true} do
{
_boxes = nearestObjects [_x, [""MedBox0"", ""AmmoBoxBig"", ""USBasicWeapons_EP1"", ""USBasicAmmunitionBox_EP1"", ""UNBasicWeapons_EP1"", ""UNBasicAmmunitionBox_EP1"", ""USLaunchers_EP1"", ""USVehicleBox_EP1"", ""USSpecialWeapons_EP1"", ""LocalBasicAmmunitionBox"", ""Gunrack2"", ""Gunrack1"", ""RULaunchersBox"", ""RUBasicWeaponsBox"", ""RUBasicAmmunitionBox"", ""LocalBasicWeaponsBox"", ""RUSpecialWeaponsBox"", ""USBasicWeaponsBox"", ""USVehicleBox"", ""RUVehicleBox"", ""USSpecialWeaponsBox"", ""SpecialWeaponsBox"", ""USLaunchersBox"", ""TKVehicleBox_EP1"", ""TKSpecialWeapons_EP1"", ""TKOrdnanceBox_EP1"", ""TKLaunchers_EP1"", ""TKBasicWeapons_EP1"", ""TKBasicAmmunitionBox_EP1"", ""GunrackUS_EP1"", ""GunrackTK_EP1"", ""GuerillaCacheBox_EP1"", ""GERBasicWeapons_EP1"", ""CZBasicWeapons_EP1"", ""AmmoCrates_NoInteractive_Small"", ""AmmoCrates_NoInteractive_Medium"", ""AmmoCrate_NoInteractive_"", ""GuerillaCacheBox"", ""USBasicAmmunitionBox"", ""USOrdnanceBox_EP1"", ""RUOrdnanceBox"", ""AmmoBoxSmall_556"", ""AmmoBoxSmall_762"", ""ItemMatchbox"", ""ItemToolbox"", ""CardBoardBox"", ""FoodBox1"", ""FoodBox2"",""FoodBox3""], 50];"
{
_box = _x;
_weap = getWeaponCargo _box;
_players_nearby = _box nearEntities [AllPlayers, 50];
if (str(_weap) != '[[],[]]') then {
diag_log(""Hacker Box - "" + str(_players_nearby));
{
diag_log(""Hacker Box - "" + str(_box distance _x) + "" - "" + str(_x));
} forEach _players_nearby;
deleteVehicle _box;
diag_log (""Hacker Box - Weapons list is "" + str(_weap));
diag_log(""Hacker Box - Deleting hacker box"");
};
} forEach _boxes;
};
was wondering if anyone could help out why this isnt working