Garry's Mod

Garry's Mod

SWEP Construction Kit
16 Sep, 2015 @ 12:35pm
Issue coding holdtype
Hello, I was making RP SWEP with holdtype of dual pistols, when I tested it I ended up with holdtype of one armed pistol. I even tried code to override it:

function SWEP:Initialize()

self:SetHoldType( "duel" )

end

But I would end up with invisible worldmodel/viewmodel and sometimes even with console error saying something about lower code or something and I would end up again with one armed pistol holdtype, but when I did not got the error message I had dual pistol holdtype. Please help me.
Last edited by ; 17 Sep, 2015 @ 5:45am
< >
Showing 1-3 of 3 comments
Clavus  [developer] 17 Sep, 2015 @ 5:28am 
According to this: http://wiki.garrysmod.com/page/Hold_Types , the holdtype name is 'duel', not 'dual'. Also the errors are probably because you redefined SWEP:Initialize there, overriding the base code one.
17 Sep, 2015 @ 5:45am 
Originally posted by Clavus:
According to this: http://wiki.garrysmod.com/page/Hold_Types , the holdtype name is 'duel', not 'dual'. Also the errors are probably because you redefined SWEP:Initialize there, overriding the base code one.
I did typed duel to the code. I just made typo here in discussion, going to fix it.
I have no idea what hapenned, so I just made the swep only for one hand.
Last edited by ; 17 Sep, 2015 @ 5:46am
30 Jan, 2016 @ 10:20am 
Originally posted by Grenade God:
Maybe too late to be relevant, but I just ran into this issue. Certain player models don't support various hold types.
What about the default ones? (Citizen, metrocop, etc.)
< >
Showing 1-3 of 3 comments
Per page: 1530 50