CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 1
Call of Duty: Black Ops 1 Mods and Scripts
Call of Duty: Black Ops 1 Scripts
GSC Help random box...
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="vampytwist" data-source="post: 26274" data-attributes="member: 31216"><p>This should work for black ops 1 not sure haven 't tested it, nor have I worked with black ops 1 so don't know much about built in functions or naming.</p><p></p><p>[code]</p><p>AllWeaponsInBox() {</p><p> self IPrintLn("All Weapons added to box");</p><p> level.modded_box = 1;</p><p> if (isDefined(level.custom_magic_box_selection_logic))</p><p> level.custom_magic_box_selection_logic = undefined;</p><p> if (isDefined(level.special_weapon_magicbox_check))</p><p> level.special_weapon_magicbox_check = undefined;</p><p> if (isDefined(level.content_weapon))</p><p> level.content_weapon = undefined;</p><p> foreach(weapon in level.zombie_weapons)</p><p> weapon.is_in_box = 1;</p><p> level.limited_weapons = [];</p><p> level.box_weapons = [];</p><p> level.box_weapons = array_copy_if_array(level.zombie_weapons);</p><p> level.customrandomweaponweights = ::MBOverride;</p><p>}</p><p></p><p>randomize_array(array) {</p><p> for (i = 0; i < array.size; i++) {</p><p> j = RandomInt(array.size);</p><p> temp = array[i];</p><p> array[i] = array[j];</p><p> array[j] = temp;</p><p> }</p><p> return array;</p><p>}</p><p></p><p>array_copy_if_array(any_var) {</p><p> return (IsArray(any_var) ? ArrayCopy(any_var) : any_var);</p><p>}</p><p></p><p>MBOverride(player) {</p><p> level.box_weapons = randomize_array(level.box_weapons);</p><p> return level.box_weapons;</p><p>}</p><p></p><p>NoBoxWeapons() {</p><p> self IPrintLn("All Weapons removed from box");</p><p> if (!isDefined(level.modded_box))</p><p> AllWeaponsInBox();</p><p> level.limited_weapons = [];</p><p> level.box_weapons = [];</p><p>}</p><p></p><p>allweaponsaddtobox(value) {</p><p> self IPrintLn("Added Weapon: " + value + " To the box");</p><p> if (!isDefined(level.modded_box)) {</p><p> AllWeaponsInBox();</p><p> }</p><p> level.zombie_weapons[value].is_in_box = 1;</p><p> level.limited_weapons[value] = undefined;</p><p> level.box_weapons = ArrayInsert(level.box_weapons, value, 0);</p><p>}</p><p></p><p>OneWeaponInBox(value) {</p><p> self IPrintLn("Weapon: " + value + " Is now the only weapon in the box");</p><p> if (!isDefined(level.modded_box)) {</p><p> AllWeaponsInBox();</p><p> }</p><p> level.zombie_weapons[value].is_in_box = 1;</p><p> level.limited_weapons[value] = undefined;</p><p> level.box_weapons = [];</p><p> level.box_weapons[0] = value;</p><p>}</p><p></p><p>[/code]</p><p></p><p> What you would now need to do is make a</p><p> function</p><p> to bind the button:</p><p></p><p> [code]</p><p> OneWeaponBoxToggle() {</p><p> while (1) {</p><p> if (self meleebuttonpressed() & addtobox = 0) {</p><p> OneWeaponInBox(gunIDHere);</p><p> addtobox = 1;</p><p> } else if (self meleebuttonpressed() & addtobox = 1) {</p><p> AllWeaponsInBox();</p><p> addtobox = 0;</p><p> }</p><p> }</p><p> }</p><p> [/code]</p><p></p><p> then add a check OnPlayerSpawned: [code]</p><p> If(self isHost()) {</p><p> self OneWeaponBoxToggle();</p><p> }[/code]</p><p></p><p></p><p>P.S: I've just woke up, this was quickly put together like I said may or may not work but this is how you can try to go about it you may need to tweak/edit some things to get this working for black ops 1. If it doesn't later on during the day I'll download black ops 1 from steam and have a better look and get it fully working.</p></blockquote><p></p>
[QUOTE="vampytwist, post: 26274, member: 31216"] This should work for black ops 1 not sure haven 't tested it, nor have I worked with black ops 1 so don't know much about built in functions or naming. [code] AllWeaponsInBox() { self IPrintLn("All Weapons added to box"); level.modded_box = 1; if (isDefined(level.custom_magic_box_selection_logic)) level.custom_magic_box_selection_logic = undefined; if (isDefined(level.special_weapon_magicbox_check)) level.special_weapon_magicbox_check = undefined; if (isDefined(level.content_weapon)) level.content_weapon = undefined; foreach(weapon in level.zombie_weapons) weapon.is_in_box = 1; level.limited_weapons = []; level.box_weapons = []; level.box_weapons = array_copy_if_array(level.zombie_weapons); level.customrandomweaponweights = ::MBOverride; } randomize_array(array) { for (i = 0; i < array.size; i++) { j = RandomInt(array.size); temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; } array_copy_if_array(any_var) { return (IsArray(any_var) ? ArrayCopy(any_var) : any_var); } MBOverride(player) { level.box_weapons = randomize_array(level.box_weapons); return level.box_weapons; } NoBoxWeapons() { self IPrintLn("All Weapons removed from box"); if (!isDefined(level.modded_box)) AllWeaponsInBox(); level.limited_weapons = []; level.box_weapons = []; } allweaponsaddtobox(value) { self IPrintLn("Added Weapon: " + value + " To the box"); if (!isDefined(level.modded_box)) { AllWeaponsInBox(); } level.zombie_weapons[value].is_in_box = 1; level.limited_weapons[value] = undefined; level.box_weapons = ArrayInsert(level.box_weapons, value, 0); } OneWeaponInBox(value) { self IPrintLn("Weapon: " + value + " Is now the only weapon in the box"); if (!isDefined(level.modded_box)) { AllWeaponsInBox(); } level.zombie_weapons[value].is_in_box = 1; level.limited_weapons[value] = undefined; level.box_weapons = []; level.box_weapons[0] = value; } [/code] What you would now need to do is make a function to bind the button: [code] OneWeaponBoxToggle() { while (1) { if (self meleebuttonpressed() & addtobox = 0) { OneWeaponInBox(gunIDHere); addtobox = 1; } else if (self meleebuttonpressed() & addtobox = 1) { AllWeaponsInBox(); addtobox = 0; } } } [/code] then add a check OnPlayerSpawned: [code] If(self isHost()) { self OneWeaponBoxToggle(); }[/code] P.S: I've just woke up, this was quickly put together like I said may or may not work but this is how you can try to go about it you may need to tweak/edit some things to get this working for black ops 1. If it doesn't later on during the day I'll download black ops 1 from steam and have a better look and get it fully working. [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 1
Call of Duty: Black Ops 1 Mods and Scripts
Call of Duty: Black Ops 1 Scripts
GSC Help random box...
CabConModding is now on facebook! Check the latest Updates, the Site Status and much more now!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top