PropHunt point for taunting working on local gmod but not on dedicated server


So I made a prop hunt server aprox two weeks ago.

On it I added PointShop points for Killing a prop, Survive as prop or taunting, but for tauting it’s a fixed value.

What I wanted to do is add more points when the taunt is longer. So I tried it in local and got this code that I added in the taunt function :

local tauntlength = math.ceil(SoundDuration(rand_taunt))
pl:PS_Notify("Vous avez obtenu " .. tauntlength .. " points pour avoir taunt!") -- this is the message the player gets.

rand_taunt is the taunt that is played (Ex : aph/alloyrun2.mp3, taunts/props/29.wav, …) and my file structure is like that : garrysmod/gamemodes/prop_hunt/content/sound/aph/<soundfiles> for my custom taunts (or taunts/props/<soundfiles> for default prop hunt taunts)

In local it works (The values the function return is most of the time shorter than the taunt but… Yeah I saw on this function desc that it doesn’t return corect value most of the time)

However, when I sent the file to my dedicated server, it doesn’t works, it always give 0 points…

In local :

On the server…

Is there something to do about this, or is SoundDuration not working on dedicated server ? :what:
Thanks for your ideas.

Local means a listen server? It may be that the dedi server doesn’t have the sound and therefore doesn’t know how long it is, but on listen it does since the server is your client.

Try adding the sounds to the server if they aren’t already.

The sounds are obviously on the server, on the path I said, like that :

The fastDL is from the server and I made a symbolic link on the fastDL folder to /home/steam/prop_hunt/garrysmod/gamemodes/prop_hunt/content/sound and they download fine so they are correctly in here.

I tried with a clean gmod using only the addons folder form the server, and it was still working on local. When I say local it’s when I start gmod in single player mode with the scripts on my local drive so yeah basicaly in listen server mode.


Since I could’nt get it working I used a workarround… I edited the taunt list like that


And ofc edited the gamemode to accomodate. The number is the lenght of the taunt that I entered by hand. Like that the value is precise AND it works on the server.

Idk if I should set it to resolved as the actual issue of SoundDuration() not working on dedicated server still remains but I just wont use it anymore.

If you’re Local server is running windows and your Dedicated server is running Linux, Have you made sure that your folder names are lowercase