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

Hi,

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_GivePoints(tauntlength)
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 :

http://puu.sh/myuP5/77ec6d3024.jpg

http://puu.sh/myuSj/5b0d2ee28a.jpg

On the server…

http://puu.sh/myuWQ/e0a6f85261.jpg

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 :

http://puu.sh/myyyd/9a7d879718.png

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.

EDIT :

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



PROP_TAUNTS = {
	{"taunts/boom_headshot.wav",1},
	{"taunts/go_away_or_i_shall.wav",3},
	{"taunts/ill_be_back.wav",1},
	{"taunts/negative.wav",1},
	{"taunts/doh.wav",1},
	{"taunts/oh_yea_he_will_pay.wav",4},
	{"taunts/ok_i_will_tell_you.wav",5},
	{"taunts/please_come_again.wav",1},
	{"taunts/threat_neutralized.wav",1},
	{"taunts/what_is_wrong_with_you.wav",2},
	{"taunts/woohoo.wav",1},
	{"taunts/props/1.wav",1},
	{"taunts/props/2.wav",1},
	{"taunts/props/3.wav",3},
	{"taunts/props/4.wav",4},
[...]
}

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