Raised This Month: $32 Target: $400
 8% 

Stop Map Music Fixed [ALL GAMES]


Post New Thread Reply   
 
Thread Tools Display Modes
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-12-2017 , 11:08   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #21

(cs:go only, i think? unless the snd_playsounds method works for other games. never tested elsewhere.)
this should work much faster, by actually hooking sounds and executing snd_playsounds Music.StopAllExceptMusic on the client. it shouldn't interfere with the round start music that is played by the game.

use !sound to toggle (it's saved as a cookie)
!nightcore to make your players' ears rip apart when map music plays (requires rcon access)

* use george's extension to make soundscapes also stop playing automatically: https://github.com/GeorgeRiley/sm-ex...eHook/releases
** you have to rebuild george's extension for cs:go and get the correct gamedata for cs:go. i can't help with that as i haven't tested soundscapes at all but i can't see why it wouldn't work.

edit: updated plugin to compile here. compile it locally with the provided .inc if you follow the instructions above.
Attached Files
File Type: inc soundscapehook.inc (840 Bytes, 489 views)
File Type: sp Get Plugin or Get Source (sm_sound.sp - 1341 views - 4.3 KB)
__________________
retired

Last edited by shavit; 10-13-2017 at 02:21.
shavit is offline
BASTIEN1
Junior Member
Join Date: May 2017
Old 10-12-2017 , 13:52   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #22

Quote:
Originally Posted by shavit View Post
(cs:go only, i think)
this should work much faster, by actually hooking sounds and executing snd_playsounds Music.StopAllExceptMusic on the client. it shouldn't interfere with the round start music that is played by the game.

use !sound to toggle (it's saved as a cookie)
!nightcore to make your players' ears rip apart when map music plays (requires rcon access)

* use george's extension to make soundscapes also stop playing automatically: https://github.com/GeorgeRiley/sm-ex...eHook/releases
I dont understand how this is suppose to work for csgo? I installed the extension + the plugin but my error logs says

[SM] Unable to load extension "soundscapehook.ext": /servers/mg/csgo/addons/sourcemod/extensions/soundscapehook.ext.so: cannot open shared object file: No such file or directory

Because the url you gave us is a css extension.

Also why do you have the variable like this char[] sInfo = new char[16]; when it should be char sInfo[16]; ..

Last edited by BASTIEN1; 10-12-2017 at 13:55.
BASTIEN1 is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 10-12-2017 , 14:30   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #23

Have you tried https://forums.alliedmods.net/showthread.php?p=2498209
__________________
sneaK is offline
michaelrw
Senior Member
Join Date: Jul 2017
Old 10-12-2017 , 23:15   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #24

Quote:
Originally Posted by BASTIEN1 View Post
I dont understand how this is suppose to work for csgo? I installed the extension + the plugin but my error logs says

[SM] Unable to load extension "soundscapehook.ext": /servers/mg/csgo/addons/sourcemod/extensions/soundscapehook.ext.so: cannot open shared object file: No such file or directory

Because the url you gave us is a css extension.

Also why do you have the variable like this char[] sInfo = new char[16]; when it should be char sInfo[16]; ..
maybe your server is windows-based and that extension is for linux. I wonder if there is a windows version (i cant load it either bc of that error). i wouldnt have the faintest idea of how to compile the source for windows

Last edited by michaelrw; 10-12-2017 at 23:16.
michaelrw is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-13-2017 , 02:17   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #25

Quote:
Originally Posted by BASTIEN1 View Post
I dont understand how this is suppose to work for csgo? I installed the extension + the plugin but my error logs says

[SM] Unable to load extension "soundscapehook.ext": /servers/mg/csgo/addons/sourcemod/extensions/soundscapehook.ext.so: cannot open shared object file: No such file or directory

Because the url you gave us is a css extension.

Also why do you have the variable like this char[] sInfo = new char[16]; when it should be char sInfo[16]; ..
you could always rebuild the extension for cs:go (although finding gamedata for cs:go might be harder), i personally haven't done that, but i can't see why it wouldn't work. you could always remove the #include <soundscapehook> line and have it always work for cs:go (as long as it isn't a soundscape)

i initialize strings as char[] string = new char[size]; out of a habit as long as they're not globally declared, can't see what's wrong with that though. enlighten me if i'm wrong though.
__________________
retired
shavit is offline
michaelrw
Senior Member
Join Date: Jul 2017
Old 10-13-2017 , 02:33   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #26

Quote:
Originally Posted by sneaK View Post
this actually works.. the volume option didnt work for me (tested on bhop_interloper) but the !stopmusic command did
michaelrw is offline
BASTIEN1
Junior Member
Join Date: May 2017
Old 10-14-2017 , 00:43   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #27

Quote:
Originally Posted by michaelrw View Post
maybe your server is windows-based and that extension is for linux. I wonder if there is a windows version (i cant load it either bc of that error). i wouldnt have the faintest idea of how to compile the source for windows
Like i dont know the difference between a .so and .dll lmfao
BASTIEN1 is offline
BASTIEN1
Junior Member
Join Date: May 2017
Old 10-14-2017 , 00:50   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #28

Quote:
Originally Posted by shavit View Post
you could always rebuild the extension for cs:go (although finding gamedata for cs:go might be harder), i personally haven't done that, but i can't see why it wouldn't work. you could always remove the #include <soundscapehook> line and have it always work for cs:go (as long as it isn't a soundscape)

i initialize strings as char[] string = new char[size]; out of a habit as long as they're not globally declared, can't see what's wrong with that though. enlighten me if i'm wrong though.
Simply put it, thats a odd way of doing it, longer way of doing it as well. Will it work? Probably? If you need more "enlightenment" then ask some people on sourcemod discord that aren't new to source mod cause i already showed you.
BASTIEN1 is offline
michaelrw
Senior Member
Join Date: Jul 2017
Old 10-16-2017 , 15:41   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #29

Quote:
Originally Posted by BASTIEN1 View Post
Like i dont know the difference between a .so and .dll lmfao
lol.. i dont know you bro so of course i dont know your level of experience. gg
michaelrw is offline
Nexicon
Senior Member
Join Date: Feb 2017
Old 12-10-2017 , 09:02   Re: Stop Map Music Fixed [ALL GAMES]
Reply With Quote #30

Quote:
Originally Posted by shavit View Post
(cs:go only, i think? unless the snd_playsounds method works for other games. never tested elsewhere.)
this should work much faster, by actually hooking sounds and executing snd_playsounds Music.StopAllExceptMusic on the client. it shouldn't interfere with the round start music that is played by the game.

use !sound to toggle (it's saved as a cookie)
!nightcore to make your players' ears rip apart when map music plays (requires rcon access)

* use george's extension to make soundscapes also stop playing automatically: https://github.com/GeorgeRiley/sm-ex...eHook/releases
** you have to rebuild george's extension for cs:go and get the correct gamedata for cs:go. i can't help with that as i haven't tested soundscapes at all but i can't see why it wouldn't work.

edit: updated plugin to compile here. compile it locally with the provided .inc if you follow the instructions above.
Works great! But can you maybe add sm_stopmusic to it?
Nexicon is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode