Jump to content

eNN.cL N0yz

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by eNN.cL N0yz

  1. eNN.cL N0yz

    Spawning new objects

    PlayerBase boxf_target; if(count == 2) { boxf_target = GetPlayer(tokens[1]); if(boxf_target == NULL) { SendMessageToPlayer(player, "[boxf] Can't find player called: '"+tokens[1]+"'"); } else { SendMessageToPlayer(player, "[boxf] You boxf " + boxf_target.GetIdentity().GetName()); } } else { boxf_target = player; SendMessageToPlayer(player, "[boxf] You boxf yourself"); } if(boxf_target != NULL) { ItemBase boxf_fnx; EntityAI boxf; boxf = EntityAI.Cast(GetGame().CreateObject( "AmmoBox", boxf_target.GetPosition(), false, true )); EntityAI ttaka = boxf.GetInventory().CreateInInventory("FNX45"); ttaka.GetInventory().CreateAttachment("PistolSuppressor"); ttaka.GetInventory().CreateAttachment("FNP45_MRDSOptic"); ttaka.GetInventory().CreateAttachment("UniversalLight"); boxf.GetInventory().CreateInInventory("AmmoBox_45ACP_25rnd"); boxf.GetInventory().CreateInInventory("AmmoBox_45ACP_25rnd"); boxf.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); boxf.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); boxf.GetInventory().CreateInInventory("Mag_FNX45_15Rnd"); boxf.GetInventory().CreateInInventory("Mag_FNX45_15Rnd"); boxf.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); boxf.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); boxf.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); boxf.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); boxf_fnx = ItemBase.Cast(boxf); }
×