• Broken Hold Types 2
    5 replies, posted
*Yes, I am posting this again. The other thread didn't help me at all. Here is what I said below* Sometimes on my Garry's Mod Dark RP server a player will have a random chance when he pulls out his gun that it's hold type is wrong (It's usually changed to the "Normal" hold type, but I've seen it in the "camera" and "melee" hold types too). Here is what the glitch looks like on my server: [img]http://i.imgur.com/o4D23xh.jpg?1[/img] Here is a video of it: [url]https://www.youtube.com/watch?v=8ldMSYGxsYk[/url] I've tried to change the addon I was using, but that didn't work. I also tried changing the hold types through the autorun files, but that also didn't work. Here is a link to the current weapons mod I'm using: [url]https://www.dropbox.com/sh/r8zk1j8in...Iavy8oOca?dl=0[/url] If you need anymore information I'd be glad to give you it.
I noticed by checking weapon_cs_base2 that on the Initialize hook it sets the hold type to "normal", idk if that has to do with it but try adding this to your weapon. [lua]function SWEP:Initialize() self:SetHoldType(self.HoldType) self.BaseClass.Initialize(self) end[/lua]
[QUOTE=YourStalker;50451488]I noticed by checking weapon_cs_base2 that on the Initialize hook it sets the hold type to "normal", idk if that has to do with it but try adding this to your weapon. [lua]function SWEP:Initialize() self:SetHoldType(self.HoldType) self.BaseClass.Initialize(self) end[/lua][/QUOTE] So I add that to weapon_cs_base_2? Or do I apply that code to all of my weapons? *EDIT Never mind, I fixed it. Thanks for your help!
[QUOTE=Von Steiner;50454453]So I add that to weapon_cs_base_2? Or do I apply that code to all of my weapons?[/QUOTE] Change weapon_cs_base_2's initialise to that
[QUOTE=rtm516;50454459]Change weapon_cs_base_2's initialise to that[/QUOTE] No the code I showed him should be added to the weapons he was having an issue with. If he wanted to modify the weapon base though all he would need to do is go to gamemode/darkrp/entities/weapons/weapon_cs_base2/shared.lua and go to line 75. Then change that to [lua]self:SetHoldType(self.HoldType)[/lua]
[QUOTE=YourStalker;50454477]No the code I showed him should be added to the weapons he was having an issue with. If he wanted to modify the weapon base though all he would need to do is go to gamemode/darkrp/entities/weapons/weapon_cs_base2/shared.lua and go to line 75. Then change that to [lua]self:SetHoldType(self.HoldType)[/lua][/QUOTE] Thanks, it worked.
Sorry, you need to Log In to post a reply to this thread.