Rpg Sound Bug (Stuck Sound)

We got a Problem on our Server, when mutch Players shoot with Rpg at the same time the Rpg Rocket sound is stuck and nerverends. All Players on Server here it, when we do a mapchange its fixed. Now i know the command stopsounds do the same job. We tryed this Command in our GameMod but it dont work…

for k,v in pairs(player.GetAll()) do
v:ConCommand(“stopsounds”)
end

Thanks for your Help.

Are you running that server-side? and are you calling it

The problem is that the command is protected from being run serverside.

add this to serverside( lua/autorun/server):

[LUA]

function players_stopsound( ply )
if ply:IsAdmin() || ply:IsSuperAdmin() then
for k,v in pairs(player.GetAll()) do
v:ConCommand(“stopdasounds”)
end
end
end
concommand.Add(“admin_stopsounds”, players_stopsound)
[/LUA]

and this to clientside(lua/autorun/client):

[LUA]
function stopmysound()
LocalPlayer():ConCommand(“stopsounds”)
end
concommand.Add(“stopdasounds”, stopmysound)

[/LUA]

or just shared ( lua/autorun) :

[LUA]
if (SERVER) then
function players_stopsound( ply )
if ply:IsAdmin() || ply:IsSuperAdmin() then
for k,v in pairs(player.GetAll()) do
v:ConCommand(“stopdasounds”)
end
end
end
concommand.Add(“admin_stopsounds”, players_stopsound)
end
if (CLIENT) then
function stopmysound()
LocalPlayer():ConCommand(“stopsounds”)
end
concommand.Add(“stopdasounds”, stopmysound)
end
[/LUA]

and noone rated me Lua helper? What kind of forum is this

Also, don’t forget to use lua tags…
[lua] --Example. [/lua]

the problem is not fixed… the code dont works.

This one should work.

[lua]function players_stopsound( ply )
if ply:IsAdmin() || ply:IsSuperAdmin() then
for k,v in pairs(player.GetAll()) do
v:SendLua(“LocalPlayer():ConCommand(‘stopsounds’)”)
end
end
end
concommand.Add(“admin_stopsounds”, players_stopsound)[/lua]

thanks for your help but i want a code how do the command “stopsound” every 5 minutes or something, its not all time an admin on server.

timer.Create(“stopPlayerSounds”,300,0,players_stopsound)