All pastes #820666 Raw Edit

Unbenannt

public text v1 · immutable
·published 2007-12-17 18:33 UTC
rendered paste body
   new ScriptObject(Inventory) {
         gun = "0";
         CrossbowAmmo = "18";
         blackmamba = "1";
         Shotgun = "0";
         rlAmmo = "0";
         ShotgunAmmo = "0";
         rl = "0";
         Flamethrower = "0";
         blackmambaAmmo = "47";
         Crossbow = "1";
         gunAmmo = "0";
         FlamethrowerAmmo = "0";
   };


CODE:

   for(%i = 0; %i <= $maxWeaponSlot; %i++)
   {
      %num = %player.getInventory($weaponInSlot[%i]);

      if(%num)
      {
         %string = "Inventory."@$weaponInSlot[%i]@" = "@%num@";";
         eval(%string);
         %string = "Inventory."@$weaponInSlot[%i].image.ammo@" = "@%player.getInventory($weaponInSlot[%i].image.ammo)@";";
         eval(%string);
      }
      else
      {
         %string = "Inventory."@$weaponInSlot[%i]@" = 0;";
         eval(%string);
         %string = "Inventory."@$weaponInSlot[%i].image.ammo@" = 0;";
         eval(%string);
      }
   }