Danke Vienna für deine Mühe
, funktioniert wunderbar.
Ich hab das ganze jetzt in eine SQF gepackt:
INIT.sqf:
Code:
xplane = -1;
handguns = ["M9","Colt1911","glock17_EP1","revolver_EP1","UZI_EP1"];
mags = ["15Rnd_9x19_M9","7Rnd_45ACP_1911","17Rnd_9x19_glock17","6Rnd_45ACP","30Rnd_9x19_UZI"];
"Zufallskiste.sqf":
Code:
_box = _this select 0;
clearweaponcargo _box;
clearmagazinecargo _box;
if (!isserver) exitwith {};
xplane = floor random (count handguns);
publicVariable "xplane";
_box addweaponcargo [handguns select xplane, 1];
_box addmagazinecargo [mags select xplane, 10];
Muss das ganze noch im Multiplayer testen, bin aber zuversichtlich
.