Garry's Mod

Garry's Mod

Sonic Screwdriver
Zinkrofin 9 Mar, 2020 @ 3:42pm
Server Side Usage Bug (FIXED) (long post sorry)
Edit 2: Yup that update worked, when I spawn it deosn't do a weird animation anymore and just spawns like This now. THANK YOU again sooo much Dr. Matt.

Edit 1: HUGE thanks to Dr. Matt for the fix, I'll test this on my server and see what happens.
This guy's fantastic. :D

This is a long post but this addon now has a bug with dedicated servers from the recent Gmod updates.

Ok so I contacted my own server provider about this issue, but it seems it's the addon itself is using the wrong animations on a dedicated server, this is because of the latest updates. (I think)

This is what I said...
I've been trying to fix this problem myself but I honestly don't know what else to do, I've tried everything.

I know I'm not meant to ask for help regarding custom content but this bug is a server-side bug I've tried and failed to fix myself, my own Garry's mod new game doesn't do this at all.

I have this bug/glitch or whatever it is when I spawn with certain weapons or give myself certain weapons they use the wrong animations. I know it's the server itself as I've tried testing stuff on my own new game and things work perfectly but the server has this annoying glitch.

I've tried reinstalling the whole server a few times and it still does the same thing. I've tried reinstalling my own Garry's mod but the server still does it, I've even tried a totally different computer and they have the same problem.

Right now I've reinstalled it again and only got 1 weapon addon added to the server (with ULX for the admin privileges). Still, the problem is still there, I don't know what else to do to try and fix this issue.

I'll show you what I mean, I took screenshots of my own new game in my own Garry's mod and my server's Garry's mod. I'd use the attachments but I took the screenshots on steam.
(I hope you are ok with steam links, the links I'll provide only go to my steam profile. If you don't want these then I can make another ticket with attachments instead, just let me know.)

This is what the weapon animation pose it's meant to do immediately on spawn. (that was taken on my own new game, not the server I bought)
Normal weapon animation on my own new game

If I put the server onto the sandbox game mode it does this, no matter the model. (taken on the server)
Server's sandbox weapon animation

When I put the server into the DarkRP game mode, it does an idle animation on spawn.
Server's DarkRP Idle Animation

But when I die and respawn in the same instance, it fixes itself and does what it's meant to do.
Server's Weapon animation after 1 death and respawning

Now this is a big problem for my DarkRP server idea as this one weapon is only used as an example fixes itself after 1 death, but other custom weapons I've tried adding (not all just some) do that idle animation and after something like 3 deaths it eventually fixes itself. I can't use the server till this is fixed because I can't have people joining and then killing themselves 3-4 times to fix an animation bug.

Please, any help at all would be greatly appreciated.



Well like I said it turns out it's an addon bug, not a server-side bug.

I got this reply from them...
This is something to do with DarkRP which causes this bug to happen. I have it on my own server when the animations are funny. There isn't much you can do to fix this other than modifying the core files or by getting the author to fix these bugs but he most likely won't considering he doesn't really update DarkRP anymore. The thing is these SWEPS and custom weapons are mostly designed by authors on Sandbox and in singe players meaning things may not appear right when they are added on the server-side. I'm afraid there isn't really any specific suggestion I can give in order to fix this though. I have also noticed that some player models can also mess up the way the animation is displayed.

they also said this afterward...
Hello,

I have done some research and it could also be due to the weapon's code if the author hasn't really updated the code since new GMod updates. This thread may be useful to you.

https://web.archive.org/web/20190407094723/https://forum.facepunch.com/gmoddev/mijo/Broken-Hold-Types/1/



So I replied with...
ah ok, so it's the hold type, I've read that before posting here but I wanted to make sure.

So any advice you can maybe give me?
like it says to change
self:SetWeaponHoldType( self.HoldType ) to self:SetHoldType( self.HoldType )
but how exactly do I do that?

or CAN I do that?
like finding a program that can extract the addon and change it myself?
Or do I contact the author of that sonic screwdriver addon myself and just hope for the best?


I got this reply back...
I wouldn't know exactly where in the Lua files as I'm not too familiar with SWEPS but you can use a tool called GMad extractor which is built into the GMod client-side files in order to extract workshop addons. Please see the guide below.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=431638110



I added a few more addons to my server and now all my character does is stand like This.


So, to hopefully fix the problem, if that post is correct. is to change self:SetWeaponHoldType( self.HoldType ) to self:SetHoldType( self.HoldType )


So I followed the guide and managed to extract the addon and seen in
lua\weapons\swep_sonicsd\

in the files, cl_init.lua is this.
https://imgur.com/a/RPU7BQ5

and in init.lua there is this.
https://imgur.com/yAmCFUj

in the shared.lua file it seems fine I think but I don't know.
https://imgur.com/YR1xZoa

I've tried posting a comment on this addon nothing has happened.
I REALLY want to use this addon on my server but with that idle animation, it's just SO annoying.
Last edited by Zinkrofin; 24 Mar, 2020 @ 1:09pm
< >
Showing 1-4 of 4 comments
Divided  [developer] 24 Mar, 2020 @ 11:54am 
Hiya mate, sorry for the delay I don't check my steam notifications often these days. I've applied the fix as recommended from SetWeaponHoldType to SetHoldType and pushed a new update to the addon on workshop. I hope that helps. My discord is on my profile if you need me.
Zinkrofin 24 Mar, 2020 @ 12:30pm 
hey :D, no problem man.
I'll test this out and let you know, it should work fine as I've been told since that change of hold type.
thank you again so much.
Zinkrofin 24 Mar, 2020 @ 1:07pm 
Yup that worked, when I spawn it doesn't do that weird bug anymore.
Only 1 more thing to say.

Allons-y!
Divided  [developer] 25 Mar, 2020 @ 5:58pm 
Perfect! Glad it's all good now. You're welcome.
< >
Showing 1-4 of 4 comments
Per page: 1530 50