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
How can I code that monkeys on Ascension always drop as first perk Juggernog?
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="CabCon" data-source="post: 25750" data-attributes="member: 1"><p>You're very much welcome. Take care.</p><p></p><p>Yes, sure. Commented the explanations. </p><p>The only part I changed was this one:</p><p>[CODE]</p><p>if ( perks.size > 0 )</p><p> {</p><p> perks = array_randomize( perks );</p><p> self give_perk( perks[0] );</p><p> }</p><p></p><p></p><p>[/CODE]</p><p>to this:</p><p>[CODE]if ( perks.size > 0 )</p><p> {</p><p> if ( !self HasPerk( "specialty_armorvest" ) ) //Here it will check if the player already got jug. The function self HasPerk( PERKNAME ) will check if the player already have a certain perk. The !-Operator adds the NOT to the if. (Feel free to google the !-Operator)</p><p> {</p><p> perks[0] = "specialty_armorvest"; //If the player doesn't got jug it will set the first index of the array from the collected perks to jug.</p><p> }</p><p> else //if the player already got jug</p><p> perks = array_randomize( perks ); //it will randomize any other perk</p><p> self give_perk( perks[0] ); //will give the first item from the perks array.</p><p> }[/CODE]</p><p></p><p>Here is also a list with all 'GSC names' of the perks:</p><p>[CODE]Perk Name:Juggernaut GSC Name: "specialty_armorvest"</p><p>Perk Name:Quickrevive GSC Name: "specialty_quickrevive"</p><p>Perk Name:Fastreload GSC Name: "specialty_fastreload"</p><p>Perk Name:Doubletap GSC Name: "specialty_rof"</p><p>Perk Name:Marathon GSC Name: "specialty_longersprint" </p><p>Perk Name:Divetonuke GSC Name: "specialty_flakjacket"</p><p>Perk Name:Additionalprimaryweapon GSC Name: "specialty_additionalprimaryweapon"</p><p>Perk Name:Deadshot GSC Name: "specialty_deadshot"[/CODE]</p><p></p><p>I hope this helped a bit. <img src="/styles/default/xenforo/smilies.emoji/people/thumbsup.emoji.svg" class="smilie" loading="lazy" alt=":y:" title="Thumbs Up :y:" data-shortname=":y:" /> If you would like to learn more about GSC take a look into our tutorial section: <a href="https://cabconmodding.com/forums/tutorial-section.53/" target="_blank">Tutorial Section | CabConModding</a> If you only looking for Call of Duty: Black Ops 1 related scripts, take a look inside this section: <a href="https://cabconmodding.com/forums/call-of-duty-black-ops-1-scripts.32/" target="_blank">Call of Duty: Black Ops 1 Scripts | CabConModding</a></p></blockquote><p></p>
[QUOTE="CabCon, post: 25750, member: 1"] You're very much welcome. Take care. Yes, sure. Commented the explanations. The only part I changed was this one: [CODE] if ( perks.size > 0 ) { perks = array_randomize( perks ); self give_perk( perks[0] ); } [/CODE] to this: [CODE]if ( perks.size > 0 ) { if ( !self HasPerk( "specialty_armorvest" ) ) //Here it will check if the player already got jug. The function self HasPerk( PERKNAME ) will check if the player already have a certain perk. The !-Operator adds the NOT to the if. (Feel free to google the !-Operator) { perks[0] = "specialty_armorvest"; //If the player doesn't got jug it will set the first index of the array from the collected perks to jug. } else //if the player already got jug perks = array_randomize( perks ); //it will randomize any other perk self give_perk( perks[0] ); //will give the first item from the perks array. }[/CODE] Here is also a list with all 'GSC names' of the perks: [CODE]Perk Name:Juggernaut GSC Name: "specialty_armorvest" Perk Name:Quickrevive GSC Name: "specialty_quickrevive" Perk Name:Fastreload GSC Name: "specialty_fastreload" Perk Name:Doubletap GSC Name: "specialty_rof" Perk Name:Marathon GSC Name: "specialty_longersprint" Perk Name:Divetonuke GSC Name: "specialty_flakjacket" Perk Name:Additionalprimaryweapon GSC Name: "specialty_additionalprimaryweapon" Perk Name:Deadshot GSC Name: "specialty_deadshot"[/CODE] I hope this helped a bit. :y: If you would like to learn more about GSC take a look into our tutorial section: [url="https://cabconmodding.com/forums/tutorial-section.53/"]Tutorial Section | CabConModding[/url] If you only looking for Call of Duty: Black Ops 1 related scripts, take a look inside this section: [url="https://cabconmodding.com/forums/call-of-duty-black-ops-1-scripts.32/"]Call of Duty: Black Ops 1 Scripts | CabConModding[/url] [/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
How can I code that monkeys on Ascension always drop as first perk Juggernog?
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