World model material crashes game

Im fixing some things on my CS:S MP5 airsoft but i have now ran into a problem. I added the w_model and w_model materials, hexed it, saved it and uploaded it for testing. Now whenever i click on the spawn icon the games crashes with no errors and a soon as i remove the w_model and w_model materials folders it works fine. So some how the w_model and material crashes the game…´with not a single error.

Faulty hexing?

Try decompiling instead and see if that works.

Well now i can at least spawn it… #rip

Post your QC.

Sorry… may i ask what you mean with QC? :speechless:

When you decompile the gun, it will generate a QC file along with some SMDs.

Here you go:
$cd “C:\Users\Andreas\Documents”
$modelname “weapons\a_smg_mp5.mdl”
$model “studio” “w_smg_mp5.smd”

$cdmaterials “models\weapons\w_models\airsof_smg_mp5”
$hboxset “default”
$hbox 0 “ValveBiped.weapon_bone” -1.597 -7.005 -16.200 0.980 3.704 17.155
$hbox 0 “ValveBiped.weapon_bone_Clip” -0.374 -4.845 -1.579 0.777 4.329 2.950
$attachment “muzzle_flash” “ValveBiped.Flash” 0.00 -0.00 0.00 rotate -90.00 -0.00 0.00
$surfaceprop “weapon”
$keyvalues { prop_data { “base” “Metal.Small” } }
$illumposition 8.749 0.277 1.616
$sequence idle “idle” fps 30.00

Did you set up the materials the same way? as $cdmaterials?

Yup i did the same for them.

Thats kinda pretty odd then, you are using the right file format for textures right? Like VTF

Yea, i am. I guess i mabye f**ked something up when hexing it since the mp5 also is sitting inside the player.

wait, why would you hex a model than decompile it
You could just decompile it and change the model name in the qc file and compile
And you wouldnt have to worry how many characters you have in the name

[editline]17th December 2016[/editline]

And hexing normally doesnt affect the position of a model so idk

Alright a break from working on my addon again… i still have some problems with my world model. My world model material works now, (My material path was wrong in some way) But now my only and final problem is that the MP5 sits in the player crotch…

I have tried:

  1. Hexing
  2. decompiling and editing the QC file
  3. Using Milkshape 3D trying to atatch it to the right bone.

And i can’t seem to get it working either of those 3 ways.

Mabye some one can do a short step by step on what i have to do? Im lost, at this simple thing…

You have to somehow change the position of the model, hexxing isnt gonna do anything