You are using _rndLOut over and over, in that code you are not assigning anything before doing the next random.. The last one is a random of 17 with 4 options ?Why does this not work, they only spawn with primary weapon
Code:_rndLOut=floor(random 28); _ailoadout= switch (_rndLOut) do { case 0: {["DMR","20Rnd_762x51_DMR"]}; case 1: {["M24","5Rnd_762x51_M24"]}; case 2: {["SVD_CAMO","10Rnd_762x54_SVD"]}; case 3: {["M40A3","5Rnd_762x51_M24"]}; case 4: {["M249_DZ","200Rnd_556x45_M249"]}; case 5: {["M240","100Rnd_762x51_M240"]}; case 6: {["Mk_48_DZ","100Rnd_762x51_M240"]}; case 7: {["Sa58V_EP1","30Rnd_762x39_SA58"]}; case 8: {["BAF_L85A2_RIS_Holo","30Rnd_556x45_Stanag"]}; case 9: {["G36C","30Rnd_556x45_G36"]}; case 10: {["M4A1_HWS_GL_camo","30Rnd_556x45_Stanag"]}; case 11: {["M16A4_ACG","30Rnd_556x45_Stanag"]}; case 12: {["G36A_camo","30Rnd_556x45_G36"]}; case 13: {["AK_47_M","30Rnd_762x39_AK47"]}; case 14: {["M16A2","30Rnd_556x45_Stanag"]}; case 15: {["FN_FAL","20Rnd_762x51_FNFAL"]}; case 16: {["M4A1","30Rnd_556x45_Stanag"]}; case 17: {["M4A1_AIM_SD_camo","30Rnd_556x45_StanagSD"]}; case 18: {["G36K_camo","30Rnd_556x45_G36"]}; case 19: {["AK_47_S","30Rnd_762x39_AK47"]}; case 20: {["VSS_Vintorez","20Rnd_9x39_SP5_VSS"]}; case 21: {["RPK_74","75Rnd_545x39_RPK"]}; case 22: {["PK","100Rnd_762x54_PK"]}; case 23: {["SVD","10Rnd_762x54_SVD"]}; case 24: {["AK_107_Kobra","30Rnd_545x39_AK"]}; case 25: {["ksvk","5Rnd_127x108_KSVK"]}; case 26: {["BAF_LRR_scoped_W","5Rnd_86x70_L115A1"]}; case 27: {["M4SPR","30Rnd_556x45_Stanag"]}; default {["ItemMap"]}; }; //Generate what the sidearm and ammo will be _rndLOut=floor(random 3); _aiside= switch (_rndLOut) do { case 0: {["UZI_EP1","15Rnd_9x19_M9"]}; case 1: {["MakarovSD","8Rnd_9x18_MakarovSD"]}; case 2: {["UZI_SD_EP1","30Rnd_9x19_UZI_SD"]}; }; //Generate what the equipment will be - it's likely to be antibiotics, but maybe.... :) _rndLOut=floor(random 17); _aiequipspawn= switch (_rndLOut) do { case 0: {["Binocular_Vector"]}; case 1: {["ItemGPS"]}; case 2: {["NVGoggles"]}; case 3: {["Binocular"]}; };