SlothWiiPlaza
Veteran
- Messages
- 34
- Reaction score
- 28
- Points
- 793
Hello CabConModding,
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.
Let's take a look:
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.
Let's take a look:
Paste this in anywhere in your GSC:
To call the function in, we simply make a new option in our menu like so:
Now, let's start attaching stuff, we want to attach a Care Package to our Jaw, change the function to this:
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
}
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:
add_option(yoursubmenuhere, "Care Package", ::attachFunc, "t6_wpn_supply_drop_ally", "j_jaw");
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.
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.
Credits:
VerTiCal for the Bones list and Model List posted here.