Weapon Attachment Extension

If you still don’t understand what this does, here is a screenshot:

[IMG_THUMB]http://filesmelt.com/dl/gm_flatgrass000243.jpg[/IMG_THUMB]

Oh which reminds me, you may want to utilize my addon called Weapon Restriction Extension, otherwise you may suffer from astronaut syndrome

[IMG_THUMB]http://filesmelt.com/dl/gm_flatgrass000352.jpg[/IMG_THUMB]

This looks great. This will be great for rp.

Good job Lau, its nice to see your still doing stuff for gmod.

Looking awesome! Worth using in Roleplay and otherwise, Tactical Shooter gamemodes like Green Shift 2 and other sort of gamemodes similar.

Thanks for releasing the script, can’t wait to use this :wink:

lmfao i didn’t notice the pair of floating feet in my screenshot. someone must have joined when i was mp testing and i didn’t even notice lol

Are you able to make it more compatible with m9k guns? atm all the pistols stick out of your ass and a about 2 or 3 rifles do aswell. I had a go at fiddling with it but didn’t seem to do much :confused:

m9k sucks.
its just a merge of gdcw and mad cow with all the good bits removed from both

what hold type do those weapons use?

also if you get the model of the weapon, use the WAE.RegisterModel function, you can choose what bone you want them to go to, and the angle/position.

You’d only really have to do that with one rifle, and one pistol. then just copy the rest over besides the model paths.

In a little while( may be like tomorrow ), i’ll download m9k and update the script so you guys don’t have to do that, because I know m9k is pretty widely used.

By the way, could you do this with Customizable Weaponry and Firearms Source 2.0 SWEPs please?
Only if it’s possible to do this because they use attachments that appear on weapons and stuff, might be a bit difficult or impossible to do but idk because I’m not a lua coder XD

this works with all weapons, considering it is based on holdtypes. some models are kind of odd, though. so you have to use the configuration fnctions.

They use the normal hold types but i have tried changing when they sit thigh, leg and what not but yer doesn’t want to budge anyway thanks in advance when you update :slight_smile:

did you try to add a custom model position? not just changing the bone for a hold type( which will break other weapons )

Aight it took me a few hours but i got there, Fixed the m9k pistols and 3 rifles that weren’t sitting right



WAE:RegisterModel( "models/weapons/w_dmg_vally.mdl", "ValveBiped.Bip01_Spine", Vector(-2.5, 4, 5), Angle(-150, -180, -80));
WAE:RegisterModel( "models/weapons/w_snip_m14sp.mdl", "ValveBiped.Bip01_Spine", Vector(-2.5, 4, 5), Angle(-150, -180, -80));
WAE:RegisterModel( "models/weapons/w_tct_famas.mdl", "ValveBiped.Bip01_Spine", Vector(-2.5, 4, 5), Angle(-150, -180, -80));

WAE:RegisterModel( "models/weapons/w_colt_python.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-6.5, -2, -1), Angle(-100, -180, -50));
WAE:RegisterModel( "models/weapons/w_m29_satan.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-6.5, -2, -1), Angle(-100, -180, -80));
WAE:RegisterModel( "models/weapons/w_model_3_rus.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-6.5, -2, -1), Angle(-100, -180, -80));
WAE:RegisterModel( "models/weapons/w_remington_1858.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-6.5, -2, -1), Angle(-100, -180, -80));
WAE:RegisterModel( "models/weapons/w_sw_model_500.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-6.5, -2, -1), Angle(-100, -180, -80));
WAE:RegisterModel( "models/weapons/w_sw_model_627.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-6.5, -2, -1), Angle(-100, -180, -80));
WAE:RegisterModel( "models/weapons/w_taurus_raging_bull.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-6.5, -2, -1), Angle(-100, -180, -80));
WAE:RegisterModel( "models/weapons/w_raging_bull_scoped.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-3, 1, -2), Angle(-100, -180, 180));
WAE:RegisterModel( "models/weapons/w_dmg_glock.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-3, 1, 5), Angle(-100, -180, 98));
WAE:RegisterModel( "models/weapons/w_pist_fokkususp.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-3, 1, 5), Angle(-100, -180, -95));
WAE:RegisterModel( "models/weapons/w_tcom_deagle.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-3, 1, 5), Angle(-100, -180, 98));
WAE:RegisterModel( "models/weapons/s_dmgf_co1911.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-3, 1, 5), Angle(-100, -180, 98));
WAE:RegisterModel( "models/weapons/w_hk45c.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-4.19, -2, 0.50), Angle(-100, -180, -95));
WAE:RegisterModel( "models/weapons/w_sig_229r.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-4.19, -2, 0.50), Angle(-100, -180, -95));
WAE:RegisterModel( "models/weapons/w_beretta_m92.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-4.19, -2, 0.50), Angle(-100, -180, -95));
WAE:RegisterModel( "models/weapons/w_luger_p08.mdl", "ValveBiped.Bip01_R_Thigh", Vector(-4.19, -2, 0.50), Angle(-100, -180, -95));


Thanks for the script btw

hey thanks a lot! I really appreciate that because as you now know, adjusting those positions and stuff is the most boring thing in the fuckin world.

I’ll update the release and put you in the credits.

OP Updated with new version.

No problems man and yer it is hella boring i had a sleep when i was done hahaha

Also i missed 3 guns



WAE:RegisterModel( "models/weapons/w_dmg_m16ag.mdl", "ValveBiped.Bip01_Spine", Vector(-2.5, 4, 5), Angle(-150, -180, -80));
WAE:RegisterModel( "models/weapons/w_dmg_vikhr.mdl", "ValveBiped.Bip01_Spine", Vector(-2.5, 4, 5), Angle(-150, -180, -80));
WAE:RegisterModel( "models/weapons/w_intratec_tec9.mdl", "ValveBiped.Bip01_Spine", Vector(-2.5, 4, 5), Angle(-150, -180, -80));


Thanks for the script, both of you! Mind if I use it in my gamemode with credit?

Please, do :slight_smile:

Since I have a running thing going with your threads and a semi-colon allergy, here is a no semi colon version.

omg

Well, I added the DarkRP weapons (partial CSS weapons) to this. This will work on all DarkRP weapons, as well as anything (including vanilla) that uses the CSS models for the pump shotty, AK-47, M4A1, Mac10, Glock, P228, Five-Seven or MP5. Here’s the DIY guide to add them yourself. It’s very easy.

Firstly, modify lua/autorun/server/sv_weaponattachments.lua, by going to the line


WAE.blacklist = { "weapon_physcannon", "weapon_physgun", "gmod_tool", "gmod_camera" };

and replacing it with


WAE.blacklist = { "weapon_physcannon", "weapon_physgun", "gmod_tool", "gmod_camera", "weapon_keypadchecker", "door_ram", "weaponchecker", "keys", "pocket", "arrest_stick", "unarrest_stick" };

This excludes the weapons that really aren’t weapons, and the door ram that gets in the way too much.

Secondly, scroll down and add this just above the M9K lines


--DarkRP Weapons

WAE:RegisterModel( "models/weapons/w_pist_deagle.mdl", "ValveBiped.Bip01_Pelvis", Vector(-4.19, 0, -8.54), Angle(-180, 180, 90));
WAE:RegisterModel( "models/weapons/w_pist_fiveseven.mdl", "ValveBiped.Bip01_Pelvis", Vector(-4.19, 0, -8.54), Angle(-180, 180, 90));
WAE:RegisterModel( "models/weapons/w_pist_glock18.mdl", "ValveBiped.Bip01_Pelvis", Vector(-4.19, 0, -8.54), Angle(-180, 180, 90));
WAE:RegisterModel( "models/weapons/w_pist_p228.mdl", "ValveBiped.Bip01_Pelvis", Vector(-4.19, 0, -8.54), Angle(-180, 180, 90));

WAE:RegisterModel( "models/weapons/w_smg_mp5.mdl", "ValveBiped.Bip01_Pelvis", Vector(-4.19, 0, -8.54), Angle(-180, 180, 90));
WAE:RegisterModel( "models/weapons/w_smg_mac10.mdl", "ValveBiped.Bip01_Pelvis", Vector(-4.19, 0, -8.54), Angle(-180, 180, 90));

WAE:RegisterModel( "models/weapons/w_rif_ak47.mdl", "ValveBiped.Bip01_Spine", Vector(-3.96, 4.95, 5), Angle(0,0,0));
WAE:RegisterModel( "models/weapons/w_rif_m4a1.mdl", "ValveBiped.Bip01_Spine", Vector(-3.96, 4.95, 6), Angle(0,0,0));
WAE:RegisterModel( "models/weapons/w_shot_m3super90.mdl", "ValveBiped.Bip01_Spine", Vector(-3.96, 4.95, 6), Angle(0,0,0));

Enjoy! This works great for RP servers for obvious reasons. :slight_smile: