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 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Attach Model to Specific Bone [Clean]
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="SlothWiiPlaza" data-source="post: 21221" data-attributes="member: 28649"><p style="text-align: center">Hello CabConModding, <img src="/styles/default/xenforo/smilies.emoji/people/stuck_out_tongue_winking_eye.emoji.svg" class="smilie" loading="lazy" alt=":tonguewink:" title="Tongue Wink :tonguewink:" data-shortname=":tonguewink:" /></p> <p style="text-align: center">I've had the idea to make a "Soldier" Customizer for my menu.</p> <p style="text-align: center">I was looking through some GSC Scripts and noticed the Attach Model functions is very messy.</p> <p style="text-align: center"></p> <p style="text-align: center">I've made it look clean and much better. <img src="/styles/default/xenforo/smilies.emoji/people/wink.emoji.svg" class="smilie" loading="lazy" alt=":wink:" title="Wink :wink:" data-shortname=":wink:" /></p> <p style="text-align: center"></p> <p style="text-align: center">Let's take a look:</p> <p style="text-align: center"></p> <p style="text-align: left">Paste this in anywhere in your GSC:</p> <p style="text-align: left">[PHP]attachFunc(model, bone)</p> <p style="text-align: left">{</p> <p style="text-align: left"> self endon("resetBones");</p> <p style="text-align: left"> self endon("death");</p> <p style="text-align: left"> </p> <p style="text-align: left"> self attach(model, bone); //Model to attach to bone</p> <p style="text-align: left"> self setclientthirdperson(1); //Third Person</p> <p style="text-align: left"> self iprintlnbold(self.name + ": Attached ^5" + model + "^7 to ^5" + bone + "^7."); //println to say which model you attached to which bone</p> <p style="text-align: left">}[/PHP]</p> <p style="text-align: left"></p> <p style="text-align: left">To call the function in, we simply make a new option in our menu like so:</p> <p style="text-align: left">[PHP]add_option(yoursubmenuhere, "Option 1", ::attachFunc); //Change to your add_option function![/PHP]</p> <p style="text-align: left"></p><p>Now, let's start attaching stuff, we want to attach a Care Package to our Jaw, change the function to this:</p><p>[PHP]add_option(yoursubmenuhere, "Care Package", ::attachFunc, "t6_wpn_supply_drop_ally", "j_jaw");[/PHP]</p><p></p><p>As you can see we added our model name and Bone name into the function calling to fill in the functions "model" and "bone" strings, make sure to replace them with different models/bones</p><p>for more customization. <img src="/styles/default/xenforo/smilies.emoji/people/smirk.emoji.svg" class="smilie" loading="lazy" alt=":smirk:" title="Smirk :smirk:" data-shortname=":smirk:" /></p><p></p><p>Again, this isn't anything new, i've wanted to share it with you guys so you don't need 20+ c+p'd functions when it can be done easier.</p><p></p><p>If you have any questions or need help, feel free to ask me. <img src="/styles/default/xenforo/smilies.emoji/people/relaxed.emoji.svg" class="smilie" loading="lazy" alt=":relaxed:" title="Relaxed :relaxed:" data-shortname=":relaxed:" /></p><p></p><p>Credits:</p><p>VerTiCal for the Bones list and Model List posted <a href="https://cabconmodding.com/threads/verticals-gsc-list.2493/" target="_blank">here</a>.</p><p></p><p></p><p></p><p style="text-align: center"></p></blockquote><p></p>
[QUOTE="SlothWiiPlaza, post: 21221, member: 28649"] [CENTER]Hello CabConModding, :tonguewink: I've had the idea to make a "Soldier" Customizer for my menu. I was looking through some GSC Scripts and noticed the Attach Model functions is very messy. I've made it look clean and much better. :wink: Let's take a look: [/CENTER] [LEFT]Paste this in anywhere in your GSC: [PHP]attachFunc(model, bone) { self endon("resetBones"); self endon("death"); self attach(model, bone); //Model to attach to bone self setclientthirdperson(1); //Third Person self iprintlnbold(self.name + ": Attached ^5" + model + "^7 to ^5" + bone + "^7."); //println to say which model you attached to which bone }[/PHP] To call the function in, we simply make a new option in our menu like so: [PHP]add_option(yoursubmenuhere, "Option 1", ::attachFunc); //Change to your add_option function![/PHP] [/LEFT] Now, let's start attaching stuff, we want to attach a Care Package to our Jaw, change the function to this: [PHP]add_option(yoursubmenuhere, "Care Package", ::attachFunc, "t6_wpn_supply_drop_ally", "j_jaw");[/PHP] As you can see we added our model name and Bone name into the function calling to fill in the functions "model" and "bone" strings, make sure to replace them with different models/bones for more customization. :smirk: Again, this isn't anything new, i've wanted to share it with you guys so you don't need 20+ c+p'd functions when it can be done easier. If you have any questions or need help, feel free to ask me. :relaxed: Credits: VerTiCal for the Bones list and Model List posted [URL='https://cabconmodding.com/threads/verticals-gsc-list.2493/']here[/URL]. [CENTER][/CENTER] [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Attach Model to Specific Bone [Clean]
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