Blockland Forums > Modification Help
Get a List of All Installed Items or Vehicles
Brian Smithers:
--- Quote from: Daenth on April 04, 2012, 06:54:46 PM ---
--- Code: ---%c = DatablockGroup.getCount();
for(%i=0;%i<%c;%i++)
{
%w = DatablockGroup.getObject(%i);
if(%w.getClassName() $= "ItemData" && %w.uiName !$= "")
{
//code here
}
else if(%w.getClassName() $= "VehicleData" && %w.uiName !$= "")
{
//code here
}
}
--- End code ---
--- End quote ---
this way your not calling datablockgroup.getcount(); hundreds of times