Help with randomising an .sqf on server restart

Bernardo

New Member
Hi,

I am have mulitple addon bases which are in .sqf files and would like to randomise them on startup.

So say BASEA, BASEB, BASEC and so on.

Basically I would like a script to choose to run 2 random bases on each restart.

So is there someone who could help me run this sort of script? If it can also run server side rather than client side it would also be a huge help.
 
Depending on your base structure, could be a potential nightmare for folks logged in one only to spawn and its not there. Especially if logged any height off the ground.

Sent from my HTC One X using Tapatalk 4
 
The bases are random bases with AI and would like them executed randomly rather than having them all on the server at once.
 
Have a SQF that generates a random number and based on that number that decides which base (which is divided into functions) gets added?


I use this sort of thing to randomly create items in a cargo item.

you just need to put it in the init file.

Code:
private ["_amount","_num"];
while {alive _this} do
{

// Remove the stock items from the crate
clearMagazineCargo _this;
clearWeaponCargo _this;

_amount = 1 + floor(random 6);
  if ( _amount >0 ) then {
    _this addMagazineCargo ["ItemSodaCoke",_amount];
   };

_amount = 1 + floor(random 4);
   if ( _amount >0 ) then {
     _this addMagazineCargo ["FoodchickenCooked",_amount];
   };
 
sleep 480;
};
 
Back
Top