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 3
Call of Duty: Black Ops 3 Mods and Scripts
Call of Duty: Black Ops 3 Scripts
Call of Duty: Black Ops 3 Scripts Question
Call of Duty: Black Ops 3 Answered Questions
Anyone willing to help me?
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="Aspire" data-source="post: 13813" data-attributes="member: 19825"><p>I've got a hold of this function and tried to port it to bo3. I am really tired atm and thought I'd just post it here and let other's try lol... I will ofc give credit and post it in the code list asap.</p><p></p><p><img src="http://i.giphy.com/l3vR8WWoEiGn57qEM.gif" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p><p></p><p>[CODE]</p><p>#using scripts\shared\weapons_shared;</p><p>#using scripts\shared\array_shared;</p><p></p><p>function physicalWeapArray(weaponArray, type)</p><p>{</p><p> self endon("disconnect");</p><p> level endon("game_ended");</p><p></p><p> self SetClientPlayerPushAmount(0);</p><p> //self disableControls();</p><p> self freezeControls(true); </p><p></p><p></p><p> array_ = [];</p><p> normal = getArrayKeys(weaponArray); //weapon array ?</p><p></p><p> for(a = 0; a < normal.size; a++)</p><p> if(!isIllegalWeapon(normal[a], type))</p><p> array_[array_.size] = normal[a];</p><p></p><p></p><p> randy = array::random(array_);</p><p> //randy = array_randomize(array_);</p><p></p><p> self setStance("stand");</p><p> self setPlayerAngles((0, 180, 0));</p><p> tehAngle = self.angles + (0, 90, 0);</p><p></p><p> weapon = [];</p><p></p><p> for(a = 0; a < 3; a++)</p><p> weapon[a] = spawnSM(self.origin + (0, 0, 75 - a * 20), getWeaponModel(randy[a]), tehAngle); //getWeaponModel might be GetWeaponWorldModel() but idk</p><p> for(a = 0; a < 3; a++)</p><p> weapon[a] moveX(-70, 1, 1);</p><p></p><p> currentWeapon=[];</p><p> for(a = 0; a < 3; a++)</p><p> currentWeapon[a] = randy[a];</p><p></p><p> curs = 0;</p><p> wait(1);</p><p></p><p> while(1)</p><p> {</p><p> if(!is_player_valid(self, undefined, false)) //is_player_valid ?</p><p> break;</p><p> </p><p> if(self adsButtonPressed() || self attackButtonPressed())</p><p> {</p><p> PlaySoundAtPosition("fly_shotgun_push", self.origin); //fly_shotgun_push ?</p><p> oldcurs = curs;</p><p> curs+= self adsButtonPressed();</p><p> curs-= self attackButtonPressed();</p><p> if(oldcurs < curs)</p><p> {</p><p> for(a=0; a < weapon.size; a++) weapon[a] hide();</p><p> thread createTempWeapon(weapon[0].origin, weapon[0].origin + (-50, 0, 0), weapon[0].model, tehAngle, 0.5, 0.25, 0.25);</p><p> thread createTempWeapon(weapon[1].origin, weapon[1].origin + (0, 0, 20), weapon[1].model, tehAngle, 0.5, 0.25, 0.25);</p><p> thread createTempWeapon(weapon[2].origin, weapon[2].origin + (0, 0, 20), weapon[2].model, tehAngle, 0.5, 0.25, 0.25);</p><p></p><p> while(1)</p><p> {</p><p> newWeapon = array_[RandomInt(array_.size)];</p><p> if(newWeapon != currentWeapon[0] && newWeapon != currentWeapon[1] && newWeapon != currentWeapon[2])</p><p> break;</p><p> wait(0.05);</p><p> }</p><p></p><p> thread createTempWeapon(self.origin + (-70, 0, -5), self.origin + (-70, 0, 35), getWeaponModel(newWeapon), tehAngle, 0.5, 0.25, 0.25);</p><p> weapon[0] setModel(weapon[1].model);</p><p> weapon[1] setModel(weapon[2].model);</p><p> weapon[2] setModel(getWeaponModel(newWeapon));</p><p> currentWeapon[0] = currentWeapon[1];</p><p> currentWeapon[1] = currentWeapon[2];</p><p> currentWeapon[2] = newWeapon;</p><p> }</p><p> if(oldcurs > curs)</p><p> {</p><p> for(a = 0; a < weapon.size; a++) weapon[a] hide();</p><p> thread createTempWeapon(weapon[0].origin, weapon[0].origin + (0, 0, -20), weapon[0].model, tehAngle, 0.5, 0.25, 0.25);</p><p> thread createTempWeapon(weapon[1].origin, weapon[1].origin + (0, 0, -20), weapon[1].model, tehAngle, 0.5, 0.25, 0.25);</p><p> thread createTempWeapon(weapon[2].origin, weapon[2].origin + (-50, 0, 0), weapon[2].model, tehAngle, 0.5, 0.25, 0.25);</p><p></p><p> while(1)</p><p> {</p><p> newWeapon=array_[randomInt(array_.size)];</p><p> if(newWeapon != currentWeapon[0] && newWeapon != currentWeapon[1] && newWeapon != currentWeapon[2])</p><p> break;</p><p> wait(0.05);</p><p> }</p><p></p><p> thread createTempWeapon(self.origin + (-70, 0, 105), self.origin + (-70, 0, 75), getWeaponModel(newWeapon), tehAngle, 0.5, 0.25, 0.25); //GET WEAPON MODEL NEEDED</p><p> weapon[2] setModel(weapon[1].model);</p><p> weapon[1] setModel(weapon[0].model);</p><p> weapon[0] setModel(getWeaponModel(newWeapon));</p><p> currentWeapon[2] = currentWeapon[1];</p><p> currentWeapon[1] = currentWeapon[0];</p><p> currentWeapon[0] = newWeapon;</p><p> }</p><p> wait(0.5);</p><p></p><p> for(a = 0; a < weapon.size; a++)</p><p> weapon[a] show();</p><p></p><p> if(curs < 0)</p><p> curs = array_.size-1;</p><p></p><p> if(curs > array_.size-1)</p><p> curs = 0;</p><p> }</p><p> if(self useButtonPressed())</p><p> {</p><p> PlaySoundAtPosition("zmb_cha_ching", self.origin); //level.zombie_sounds["purchase"]</p><p> sWeapon = currentWeapon[1];</p><p> self handWeapon(sWeapon);</p><p> weapon[1] moveX(60, 1, 1);</p><p> wait(1);</p><p> break;</p><p> }</p><p> if(self meleebuttonPressed())</p><p> {</p><p> PlaySoundAtPosition("zmb_hellbox_close", self.origin); //zmb_hellbox_close</p><p> weapon[0] moveTo(weapon[0].origin + (0, 0, -70), 0.5, 0.25, 0.25);</p><p> weapon[1] moveTo(weapon[1].origin + (0, 0, -70), 0.5, 0.25, 0.25);</p><p> weapon[2] moveTo(weapon[2].origin + (0, 0, -70), 0.5, 0.25, 0.25);</p><p> wait(0.45);</p><p> break;</p><p> }</p><p> wait(0.05);</p><p> }</p><p> for(a = 0; a < weapon.size; a++)</p><p> weapon[a] delete();</p><p></p><p> self SetClientPlayerPushAmount(1);</p><p> self freezeControls(false);</p><p> //self enableControls();</p><p>}</p><p></p><p>function handWeapon(weap)</p><p>{</p><p> if(self hasWeapon(weap))</p><p> return;</p><p> else</p><p> {</p><p> self TakeWeapon(self GetCurrentWeapon());</p><p> self GiveWeapon(weap);</p><p> self GiveMaxAmmo(weap);</p><p> self SwitchToWeapon(weap);</p><p> }</p><p>}</p><p></p><p>function createTempWeapon(startPos, endPos, model, angles, time, de, ac)</p><p>{</p><p> weapon = spawnSM(startPos, model, angles);</p><p> weapon moveTo(endPos, time, de, ac);</p><p> weapon waittill("movedone");</p><p> weapon delete();</p><p>}</p><p></p><p>function isIllegalWeapon(weapon, type)</p><p>{ </p><p> if(type == "Normal")</p><p> illegal = strTok("staff_revive_zm;staff_water_upgraded_zm;staff_water_zm_cheap;staff_water_zm;staff_lightning_upgraded_zm;staff_lightning_zm;staff_fire_upgraded_zm;staff_fire_zm;staff_air_upgraded_zm;staff_air_zm;sticky_grenade_zm;frag_grenade_zm;cymbal_monkey_zm;claymore_zm;beacon_zm;beretta93r_zm;mp40_zm;ak74u_zm",";");</p><p> else</p><p> illegal = strTok("beretta93r_upgraded_zm;mp40_upgraded_zm;ak74u_upgraded_zm",";"); </p><p> </p><p> for(a = 0; a < illegal.size; a++)</p><p> if(isSubStr(weapon, illegal[a]))</p><p> return true;</p><p> return false;</p><p>}</p><p></p><p>function spawnSM(origin, model, angles)</p><p>{</p><p> bog = spawn("script_model", origin);</p><p> bog setModel(model);</p><p> bog.angles = angles;</p><p></p><p> if(!isSolo())</p><p> wait(0.05);</p><p> return bog;</p><p>}</p><p></p><p>/*</p><p></p><p>function disableControls(time)</p><p>{</p><p> if(!isEmpty(time))</p><p> {</p><p> wait(time);</p><p> self.controls = false;</p><p> }</p><p> else</p><p> self.controls = false;</p><p>}</p><p></p><p>function enableControls(time)</p><p>{</p><p> if(!isEmpty(time))</p><p> {</p><p> wait(time);</p><p> self.controls = true;</p><p> }</p><p> else</p><p> self.controls = true;</p><p>}</p><p></p><p>*/</p><p>[/CODE]</p><p></p><p>[SPOILER]</p><p>Original source:</p><p>[CODE]</p><p>physicalWeap(weaponArray, type)</p><p>{</p><p> self setclientplayerpushamount( 0 );</p><p> self thread lockMenu("ALL");</p><p> self freezeControls(true); </p><p> array = [];</p><p> normal=getArrayKeys(weaponArray); //we may need weapon array</p><p> for(a=0;a<normal.size;a++)</p><p> if(!isIllegalWeapon(normal[a], type))</p><p> array[array.size] = normal[a];</p><p> randy=array_randomize(array);</p><p> self setStance("stand");</p><p> self setPlayerAngles((0,180,0));</p><p> tehAngle = self.angles+(0,90,0);</p><p> weapon=[];</p><p> for(a=0;a<3;a++) weapon[a] = spawnSM(self.origin+(0,0,75-a*20),getWeaponModel(randy[a]),tehAngle);</p><p> for(a=0;a<3;a++) weapon[a] moveX(-70,1,1);</p><p> currentWeapon=[];</p><p> for(a=0;a<3;a++) currentWeapon[a] = randy[a];</p><p> curs = 0; wait 1;</p><p> self endon("disconnect");</p><p> level endon("end_game");</p><p> while(1)</p><p> {</p><p> if(!is_player_valid(self, undefined, false))</p><p> break;</p><p> </p><p> if(self adsButtonPressed() || self attackButtonPressed())</p><p> {</p><p> playsoundatposition("fly_shotgun_push", self.origin);</p><p> oldcurs = curs;</p><p> curs+= self adsButtonPressed();</p><p> curs-= self attackButtonPressed();</p><p> if(oldcurs < curs)</p><p> {</p><p> for(a=0;a<weapon.size;a++) weapon[a] hide();</p><p> thread createTempWeapon(weapon[0].origin,weapon[0].origin+(-50,0,0),weapon[0].model,tehAngle,.5,.25,.25);</p><p> thread createTempWeapon(weapon[1].origin,weapon[1].origin+(0,0,20),weapon[1].model,tehAngle,.5,.25,.25);</p><p> thread createTempWeapon(weapon[2].origin,weapon[2].origin+(0,0,20),weapon[2].model,tehAngle,.5,.25,.25);</p><p> while(1)</p><p> {</p><p> newWeapon=array[randomInt(array.size)];</p><p> if(newWeapon!=currentWeapon[0] && newWeapon!=currentWeapon[1] && newWeapon!=currentWeapon[2])break;</p><p> wait .05;</p><p> }</p><p> thread createTempWeapon(self.origin+(-70,0,-5),self.origin+(-70,0,35),getWeaponModel(newWeapon),tehAngle,.5,.25,.25);</p><p> weapon[0] setModel(weapon[1].model);</p><p> weapon[1] setModel(weapon[2].model);</p><p> weapon[2] setModel(getWeaponModel(newWeapon));</p><p> currentWeapon[0]=currentWeapon[1];</p><p> currentWeapon[1]=currentWeapon[2];</p><p> currentWeapon[2]=newWeapon;</p><p> }</p><p> if(oldcurs > curs)</p><p> {</p><p> for(a=0;a<weapon.size;a++) weapon[a] hide();</p><p> thread createTempWeapon(weapon[0].origin,weapon[0].origin+(0,0,-20),weapon[0].model,tehAngle,.5,.25,.25);</p><p> thread createTempWeapon(weapon[1].origin,weapon[1].origin+(0,0,-20),weapon[1].model,tehAngle,.5,.25,.25);</p><p> thread createTempWeapon(weapon[2].origin,weapon[2].origin+(-50,0,0),weapon[2].model,tehAngle,.5,.25,.25);</p><p> while(1)</p><p> {</p><p> newWeapon=array[randomInt(array.size)];</p><p> if(newWeapon!=currentWeapon[0] && newWeapon!=currentWeapon[1] && newWeapon!=currentWeapon[2])break;</p><p> wait .05;</p><p> }</p><p> thread createTempWeapon(self.origin+(-70,0,105),self.origin+(-70,0,75),getWeaponModel(newWeapon),tehAngle,.5,.25,.25);</p><p> weapon[2] setModel(weapon[1].model);</p><p> weapon[1] setModel(weapon[0].model);</p><p> weapon[0] setModel(getWeaponModel(newWeapon));</p><p> currentWeapon[2]=currentWeapon[1];</p><p> currentWeapon[1]=currentWeapon[0];</p><p> currentWeapon[0]=newWeapon;</p><p> }</p><p> wait .5;</p><p> for(a=0;a<weapon.size;a++) weapon[a] show();</p><p> if(curs < 0) curs = array.size-1;</p><p> if(curs > array.size-1) curs = 0;</p><p> }</p><p> if(self useButtonPressed())</p><p> {</p><p> playsoundatposition(level.zombie_sounds["purchase"], self.origin);</p><p> sWeapon=currentWeapon[1];</p><p> self giveMenuWeapon(sWeapon);</p><p> weapon[1] moveX(60,1,1);</p><p> wait 1;</p><p> break;</p><p> }</p><p> if(self meleebuttonPressed())</p><p> {</p><p> playsoundatposition("zmb_hellbox_close", self.origin);</p><p> weapon[0] moveTo(weapon[0].origin+(0,0,-70),.5,.25,.25);</p><p> weapon[1] moveTo(weapon[1].origin+(0,0,-70),.5,.25,.25);</p><p> weapon[2] moveTo(weapon[2].origin+(0,0,-70),.5,.25,.25);</p><p> wait .45;</p><p> break;</p><p> }</p><p> wait 0.05;</p><p> }</p><p> for(a=0;a<weapon.size;a++)</p><p> weapon[a] delete();</p><p> self setclientplayerpushamount( 1 );</p><p> self freezeControls(false);</p><p> self unlockMenu();</p><p>}</p><p></p><p>createTempWeapon(startPos,endPos,model,angles,time,de,ac)</p><p>{</p><p> weapon = spawnSM(startPos,model,angles);</p><p> weapon moveTo(endPos,time,de,ac);</p><p> weapon waittill("movedone");</p><p> weapon delete();</p><p>}</p><p></p><p>isIllegalWeapon(weapon, type)</p><p>{ </p><p> if(type == "Normal")</p><p> illegal = strTok("staff_revive_zm;staff_water_upgraded_zm;staff_water_zm_cheap;staff_water_zm;staff_lightning_upgraded_zm;staff_lightning_zm;staff_fire_upgraded_zm;staff_fire_zm;staff_air_upgraded_zm;staff_air_zm;sticky_grenade_zm;frag_grenade_zm;cymbal_monkey_zm;claymore_zm;beacon_zm;beretta93r_zm;mp40_zm;ak74u_zm",";");</p><p> else</p><p> illegal = strTok("beretta93r_upgraded_zm;mp40_upgraded_zm;ak74u_upgraded_zm",";"); </p><p> </p><p> for(a = 0;a < illegal.size;a++)</p><p> if(isSubStr(weapon, illegal[a]))</p><p> return true;</p><p> return false;</p><p>}</p><p>giveMenuWeapon(weap)</p><p>{</p><p> if(weap == "fnfal_upgraded_zm" || weap == "galil_upgraded_zm" || weap == "ak74u_extclip_upgraded_zm")</p><p> weap = weap+"+reflex";</p><p></p><p> if(self GetWeaponsListPrimaries().size >= 9 || self hasWeapon("tomb_shield_zm") && self getWeaponsListPrimaries().size >= 8)</p><p> self iPrintlnBold("You Have Too Many Weapons");</p><p> else</p><p> {</p><p> if(self hasWeapon(weap))</p><p> return;</p><p> else</p><p> {</p><p> self giveweapon(weap, 0, self get_pack_a_punch_weapon_options(weap));</p><p> self switchtoweapon(weap);</p><p> self giveMaxAmmo(weap);</p><p> if(maps/mp/zm_tomb_utility::is_weapon_upgraded_staff(weap))</p><p> {</p><p> self setactionslot(3, "weapon", "staff_revive_zm");</p><p> self giveweapon("staff_revive_zm");</p><p> self givemaxammo("staff_revive_zm");</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="Aspire, post: 13813, member: 19825"] I've got a hold of this function and tried to port it to bo3. I am really tired atm and thought I'd just post it here and let other's try lol... I will ofc give credit and post it in the code list asap. [IMG]http://i.giphy.com/l3vR8WWoEiGn57qEM.gif[/IMG] [CODE] #using scripts\shared\weapons_shared; #using scripts\shared\array_shared; function physicalWeapArray(weaponArray, type) { self endon("disconnect"); level endon("game_ended"); self SetClientPlayerPushAmount(0); //self disableControls(); self freezeControls(true); array_ = []; normal = getArrayKeys(weaponArray); //weapon array ? for(a = 0; a < normal.size; a++) if(!isIllegalWeapon(normal[a], type)) array_[array_.size] = normal[a]; randy = array::random(array_); //randy = array_randomize(array_); self setStance("stand"); self setPlayerAngles((0, 180, 0)); tehAngle = self.angles + (0, 90, 0); weapon = []; for(a = 0; a < 3; a++) weapon[a] = spawnSM(self.origin + (0, 0, 75 - a * 20), getWeaponModel(randy[a]), tehAngle); //getWeaponModel might be GetWeaponWorldModel() but idk for(a = 0; a < 3; a++) weapon[a] moveX(-70, 1, 1); currentWeapon=[]; for(a = 0; a < 3; a++) currentWeapon[a] = randy[a]; curs = 0; wait(1); while(1) { if(!is_player_valid(self, undefined, false)) //is_player_valid ? break; if(self adsButtonPressed() || self attackButtonPressed()) { PlaySoundAtPosition("fly_shotgun_push", self.origin); //fly_shotgun_push ? oldcurs = curs; curs+= self adsButtonPressed(); curs-= self attackButtonPressed(); if(oldcurs < curs) { for(a=0; a < weapon.size; a++) weapon[a] hide(); thread createTempWeapon(weapon[0].origin, weapon[0].origin + (-50, 0, 0), weapon[0].model, tehAngle, 0.5, 0.25, 0.25); thread createTempWeapon(weapon[1].origin, weapon[1].origin + (0, 0, 20), weapon[1].model, tehAngle, 0.5, 0.25, 0.25); thread createTempWeapon(weapon[2].origin, weapon[2].origin + (0, 0, 20), weapon[2].model, tehAngle, 0.5, 0.25, 0.25); while(1) { newWeapon = array_[RandomInt(array_.size)]; if(newWeapon != currentWeapon[0] && newWeapon != currentWeapon[1] && newWeapon != currentWeapon[2]) break; wait(0.05); } thread createTempWeapon(self.origin + (-70, 0, -5), self.origin + (-70, 0, 35), getWeaponModel(newWeapon), tehAngle, 0.5, 0.25, 0.25); weapon[0] setModel(weapon[1].model); weapon[1] setModel(weapon[2].model); weapon[2] setModel(getWeaponModel(newWeapon)); currentWeapon[0] = currentWeapon[1]; currentWeapon[1] = currentWeapon[2]; currentWeapon[2] = newWeapon; } if(oldcurs > curs) { for(a = 0; a < weapon.size; a++) weapon[a] hide(); thread createTempWeapon(weapon[0].origin, weapon[0].origin + (0, 0, -20), weapon[0].model, tehAngle, 0.5, 0.25, 0.25); thread createTempWeapon(weapon[1].origin, weapon[1].origin + (0, 0, -20), weapon[1].model, tehAngle, 0.5, 0.25, 0.25); thread createTempWeapon(weapon[2].origin, weapon[2].origin + (-50, 0, 0), weapon[2].model, tehAngle, 0.5, 0.25, 0.25); while(1) { newWeapon=array_[randomInt(array_.size)]; if(newWeapon != currentWeapon[0] && newWeapon != currentWeapon[1] && newWeapon != currentWeapon[2]) break; wait(0.05); } thread createTempWeapon(self.origin + (-70, 0, 105), self.origin + (-70, 0, 75), getWeaponModel(newWeapon), tehAngle, 0.5, 0.25, 0.25); //GET WEAPON MODEL NEEDED weapon[2] setModel(weapon[1].model); weapon[1] setModel(weapon[0].model); weapon[0] setModel(getWeaponModel(newWeapon)); currentWeapon[2] = currentWeapon[1]; currentWeapon[1] = currentWeapon[0]; currentWeapon[0] = newWeapon; } wait(0.5); for(a = 0; a < weapon.size; a++) weapon[a] show(); if(curs < 0) curs = array_.size-1; if(curs > array_.size-1) curs = 0; } if(self useButtonPressed()) { PlaySoundAtPosition("zmb_cha_ching", self.origin); //level.zombie_sounds["purchase"] sWeapon = currentWeapon[1]; self handWeapon(sWeapon); weapon[1] moveX(60, 1, 1); wait(1); break; } if(self meleebuttonPressed()) { PlaySoundAtPosition("zmb_hellbox_close", self.origin); //zmb_hellbox_close weapon[0] moveTo(weapon[0].origin + (0, 0, -70), 0.5, 0.25, 0.25); weapon[1] moveTo(weapon[1].origin + (0, 0, -70), 0.5, 0.25, 0.25); weapon[2] moveTo(weapon[2].origin + (0, 0, -70), 0.5, 0.25, 0.25); wait(0.45); break; } wait(0.05); } for(a = 0; a < weapon.size; a++) weapon[a] delete(); self SetClientPlayerPushAmount(1); self freezeControls(false); //self enableControls(); } function handWeapon(weap) { if(self hasWeapon(weap)) return; else { self TakeWeapon(self GetCurrentWeapon()); self GiveWeapon(weap); self GiveMaxAmmo(weap); self SwitchToWeapon(weap); } } function createTempWeapon(startPos, endPos, model, angles, time, de, ac) { weapon = spawnSM(startPos, model, angles); weapon moveTo(endPos, time, de, ac); weapon waittill("movedone"); weapon delete(); } function isIllegalWeapon(weapon, type) { if(type == "Normal") illegal = strTok("staff_revive_zm;staff_water_upgraded_zm;staff_water_zm_cheap;staff_water_zm;staff_lightning_upgraded_zm;staff_lightning_zm;staff_fire_upgraded_zm;staff_fire_zm;staff_air_upgraded_zm;staff_air_zm;sticky_grenade_zm;frag_grenade_zm;cymbal_monkey_zm;claymore_zm;beacon_zm;beretta93r_zm;mp40_zm;ak74u_zm",";"); else illegal = strTok("beretta93r_upgraded_zm;mp40_upgraded_zm;ak74u_upgraded_zm",";"); for(a = 0; a < illegal.size; a++) if(isSubStr(weapon, illegal[a])) return true; return false; } function spawnSM(origin, model, angles) { bog = spawn("script_model", origin); bog setModel(model); bog.angles = angles; if(!isSolo()) wait(0.05); return bog; } /* function disableControls(time) { if(!isEmpty(time)) { wait(time); self.controls = false; } else self.controls = false; } function enableControls(time) { if(!isEmpty(time)) { wait(time); self.controls = true; } else self.controls = true; } */ [/CODE] [SPOILER] Original source: [CODE] physicalWeap(weaponArray, type) { self setclientplayerpushamount( 0 ); self thread lockMenu("ALL"); self freezeControls(true); array = []; normal=getArrayKeys(weaponArray); //we may need weapon array for(a=0;a<normal.size;a++) if(!isIllegalWeapon(normal[a], type)) array[array.size] = normal[a]; randy=array_randomize(array); self setStance("stand"); self setPlayerAngles((0,180,0)); tehAngle = self.angles+(0,90,0); weapon=[]; for(a=0;a<3;a++) weapon[a] = spawnSM(self.origin+(0,0,75-a*20),getWeaponModel(randy[a]),tehAngle); for(a=0;a<3;a++) weapon[a] moveX(-70,1,1); currentWeapon=[]; for(a=0;a<3;a++) currentWeapon[a] = randy[a]; curs = 0; wait 1; self endon("disconnect"); level endon("end_game"); while(1) { if(!is_player_valid(self, undefined, false)) break; if(self adsButtonPressed() || self attackButtonPressed()) { playsoundatposition("fly_shotgun_push", self.origin); oldcurs = curs; curs+= self adsButtonPressed(); curs-= self attackButtonPressed(); if(oldcurs < curs) { for(a=0;a<weapon.size;a++) weapon[a] hide(); thread createTempWeapon(weapon[0].origin,weapon[0].origin+(-50,0,0),weapon[0].model,tehAngle,.5,.25,.25); thread createTempWeapon(weapon[1].origin,weapon[1].origin+(0,0,20),weapon[1].model,tehAngle,.5,.25,.25); thread createTempWeapon(weapon[2].origin,weapon[2].origin+(0,0,20),weapon[2].model,tehAngle,.5,.25,.25); while(1) { newWeapon=array[randomInt(array.size)]; if(newWeapon!=currentWeapon[0] && newWeapon!=currentWeapon[1] && newWeapon!=currentWeapon[2])break; wait .05; } thread createTempWeapon(self.origin+(-70,0,-5),self.origin+(-70,0,35),getWeaponModel(newWeapon),tehAngle,.5,.25,.25); weapon[0] setModel(weapon[1].model); weapon[1] setModel(weapon[2].model); weapon[2] setModel(getWeaponModel(newWeapon)); currentWeapon[0]=currentWeapon[1]; currentWeapon[1]=currentWeapon[2]; currentWeapon[2]=newWeapon; } if(oldcurs > curs) { for(a=0;a<weapon.size;a++) weapon[a] hide(); thread createTempWeapon(weapon[0].origin,weapon[0].origin+(0,0,-20),weapon[0].model,tehAngle,.5,.25,.25); thread createTempWeapon(weapon[1].origin,weapon[1].origin+(0,0,-20),weapon[1].model,tehAngle,.5,.25,.25); thread createTempWeapon(weapon[2].origin,weapon[2].origin+(-50,0,0),weapon[2].model,tehAngle,.5,.25,.25); while(1) { newWeapon=array[randomInt(array.size)]; if(newWeapon!=currentWeapon[0] && newWeapon!=currentWeapon[1] && newWeapon!=currentWeapon[2])break; wait .05; } thread createTempWeapon(self.origin+(-70,0,105),self.origin+(-70,0,75),getWeaponModel(newWeapon),tehAngle,.5,.25,.25); weapon[2] setModel(weapon[1].model); weapon[1] setModel(weapon[0].model); weapon[0] setModel(getWeaponModel(newWeapon)); currentWeapon[2]=currentWeapon[1]; currentWeapon[1]=currentWeapon[0]; currentWeapon[0]=newWeapon; } wait .5; for(a=0;a<weapon.size;a++) weapon[a] show(); if(curs < 0) curs = array.size-1; if(curs > array.size-1) curs = 0; } if(self useButtonPressed()) { playsoundatposition(level.zombie_sounds["purchase"], self.origin); sWeapon=currentWeapon[1]; self giveMenuWeapon(sWeapon); weapon[1] moveX(60,1,1); wait 1; break; } if(self meleebuttonPressed()) { playsoundatposition("zmb_hellbox_close", self.origin); weapon[0] moveTo(weapon[0].origin+(0,0,-70),.5,.25,.25); weapon[1] moveTo(weapon[1].origin+(0,0,-70),.5,.25,.25); weapon[2] moveTo(weapon[2].origin+(0,0,-70),.5,.25,.25); wait .45; break; } wait 0.05; } for(a=0;a<weapon.size;a++) weapon[a] delete(); self setclientplayerpushamount( 1 ); self freezeControls(false); self unlockMenu(); } createTempWeapon(startPos,endPos,model,angles,time,de,ac) { weapon = spawnSM(startPos,model,angles); weapon moveTo(endPos,time,de,ac); weapon waittill("movedone"); weapon delete(); } isIllegalWeapon(weapon, type) { if(type == "Normal") illegal = strTok("staff_revive_zm;staff_water_upgraded_zm;staff_water_zm_cheap;staff_water_zm;staff_lightning_upgraded_zm;staff_lightning_zm;staff_fire_upgraded_zm;staff_fire_zm;staff_air_upgraded_zm;staff_air_zm;sticky_grenade_zm;frag_grenade_zm;cymbal_monkey_zm;claymore_zm;beacon_zm;beretta93r_zm;mp40_zm;ak74u_zm",";"); else illegal = strTok("beretta93r_upgraded_zm;mp40_upgraded_zm;ak74u_upgraded_zm",";"); for(a = 0;a < illegal.size;a++) if(isSubStr(weapon, illegal[a])) return true; return false; } giveMenuWeapon(weap) { if(weap == "fnfal_upgraded_zm" || weap == "galil_upgraded_zm" || weap == "ak74u_extclip_upgraded_zm") weap = weap+"+reflex"; if(self GetWeaponsListPrimaries().size >= 9 || self hasWeapon("tomb_shield_zm") && self getWeaponsListPrimaries().size >= 8) self iPrintlnBold("You Have Too Many Weapons"); else { if(self hasWeapon(weap)) return; else { self giveweapon(weap, 0, self get_pack_a_punch_weapon_options(weap)); self switchtoweapon(weap); self giveMaxAmmo(weap); if(maps/mp/zm_tomb_utility::is_weapon_upgraded_staff(weap)) { self setactionslot(3, "weapon", "staff_revive_zm"); self giveweapon("staff_revive_zm"); self givemaxammo("staff_revive_zm"); } } } } [/CODE] [/SPOILER] [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 3
Call of Duty: Black Ops 3 Mods and Scripts
Call of Duty: Black Ops 3 Scripts
Call of Duty: Black Ops 3 Scripts Question
Call of Duty: Black Ops 3 Answered Questions
Anyone willing to help me?
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