Jump to content
Sign in to follow this  
dalia

Custom crate with CUSTOM LOADS

Recommended Posts

Hello all,

So my problem is, i want a custom crate with custom loads inside, weapons, ammos, items, i merge two scripts but one thing doesn't work.

the script called by : _nul = [this,[]] execVM "sack.sqf"

waituntil {!isnil "bis_fnc_init"};

// Initialize Crate

clearMagazineCargoglobal (_this select 0);

clearWeaponCargoglobal (_this select 0);

// Variables

_numWeapon = 2;

_numItem = 2;

_numMod = 1;

_numBag = 3;

_numAmmo = 3;

// Vests

(_this select 0) addWeaponCargo ["hgun_P07_F","arifle_MX_F", _numWeapon];call BIS_fnc_selectRandom;

Problem nothing appear in crate, if i put just one weapon, it is appear in crate. What i must do for selectrandom works, and add items and ammo in list.

In idea i want when player find crate he find random item, ammo and weapons inside, never same.

Greetings all.

Share this post


Link to post
Share on other sites
_weapons = ["hgun_P07_F","arifle_MX_F"];
(_this select 0) addWeaponCargo [_weapons select floor(random(count(_weapons))), _numWeapon];

Share this post


Link to post
Share on other sites

Perfect, thank you very much.

Share this post


Link to post
Share on other sites
Also you can use this script

Thanks, but i wanted in crate 1 random weapon and in backpack 3 randoms ammos and 1 random item, your script dont do that.

It's for a surviving mission, you must search in house, ammos, medikit etc.. For survive.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×