What the fuck is going on. Can't get weapon's muzzle pos?!

Getting the fire position for a weapon should be trivial and its proving to be a huge obstacle right now.

I’m holding a models/weapons/w_pist_fiveseven.mdl right?
Edit: originally posted a v_*.mdl, oops

local wep = player.GetAll()[1]:GetActiveWeapon()
Msg(wep:LookupAttachment(“muzzle”), wep:LookupAttachment(“muzzle_flash”), wep:LookupBone(“ValveBiped.weapon_bone”), wep:LookupBone(“ValveBiped.flash”))

–output 00nilnil hurrrrrrrr
Yes, the fiveseven has a muzzle_flash attachment and both a ValveBiped.weapon_bone and a ValveBiped.flash bone. Yet how find? I r not no.

Meh, think I figured it out, GetActiveWeapon’s model seems to be a view model not a world model and I have no idea why especially since I’m running from the server.
Doesn’t change the fact that I have no way to get the actual muzzle position of the weapon.

I’ve settled with just getting the player’s right hand bone and applying a constant offset from there (based off of the angle of course)

v_ is the viewmodel (**[Player.GetViewModel

w_ is the worldmodel

um… ok? What made you think I didn’t know that and how is that relevant? I’m looking to get the players gun position in terms of his world model.
Edit: Ah, I posted the wrong model, my bad

And I’m pretty sure world models don’t have a muzzle attachment.

I’m 100% positive they do. Look at model viewer. Or spawn a prop physics with a world model and do LookupAttachment(“muzzle”), its there.

Also I didn’t realize I copied the wrong model name, fail on my part.

Still GetActiveWeapon() is returning an entity with a view model for its model. Not really sure what that’s about. The source engine can get the muzzle pos serverside but GMod Lua cannot afaik hence this thread.

If this model was ported from another game, then I guess somebody screwed up while compiling the .qc file.

Its the five seven from css breh.