AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Random Join/Welcome Sound (https://forums.alliedmods.net/showthread.php?t=205469)

RedSword 01-11-2013 00:42

[Any] Random Join/Welcome Sound
 
4 Attachment(s)
Random Join Sound

v. 1.1.0

This plugin was originally for a paid request. Author allowed me to release it publicly, as there was no plugins doing such a thing (wtf, honestly...).

Features :
  • Play a random sound to clients that connect
  • Since it uses this, it is easy to add a sound to play; just add a sound to the folder (defined by cvar 'sm_join_sound') and wait for map change.
  • Allows client to disable the welcome sound via client prefs.

Known bugs :
CVars :
  • randomjoinsoundversion: Gives version -_-'
  • ----------
  • sm_join_sound_enable : Is the plugin enabled ? 0=No, 1=Yes. Def. 1
  • sm_join_sound : The sound folder where to take a sound to play. Def. "sound/joinsounds".
  • sm_join_sound_defaultcookie : Default cookie value. 0=Do not play, 1=Play random sound, 2=Play but stop when joining a playable team

Notes :
--------------

Any suggestions/comments on the code or the plugin are welcomed and appreciated.

Changelog :
  • 1.0.0 Initial release. (11-01-2013)
  • 1.0.1 (Semi-public) failed attempt what was fixed in 1.0.2. (01-07-2013)
  • 1.0.2 Fixed a problem with loading order (no more "FailState"). (semi-public 04-07-2013 / first post 26-10-2013)
  • 1.0.2b Real 1.0.2 <.< (previous was same as 1.0.1 :$). (27-10-2013)
  • 1.1.0 Added client prefs support (disable/enable/enable but stop on join team). (28-10-2013)

Todo list :
  • None at the moment. You're free to suggest things.

Mirandor 01-11-2013 02:28

Re: [Any] Random Join/Welcome Sound
 
Hi,

i already use this one for cs:s:

https://forums.alliedmods.net/showthread.php?p=1396152

Yours 's usable on CS:GO?

RedSword 01-11-2013 02:51

Re: [Any] Random Join/Welcome Sound
 
Quote:

Originally Posted by Mirandor (Post 1871362)
Hi,

i already use this one for cs:s:

https://forums.alliedmods.net/showthread.php?p=1396152

Yours 's usable on CS:GO?

Quote:

Originally Posted by RedSword (Post 1871328)
Tested under both CSS & CSGO. Should work under all mods.

So yes...

And thanks for the info; didn't know for the "enter" sound (there is already "welcome" and "join" as keywords... -_-)

And with my plugin, you don't need to manually put the filename inside a .txt (the folder is parsed).

Mirandor 01-11-2013 06:03

Re: [Any] Random Join/Welcome Sound
 
OK sorry: i didn't read the notes

Smffy 01-12-2013 08:18

Re: [Any] Random Join/Welcome Sound
 
Quote:

"You'll need Files Management Interface to get this plugin to work."
Do you 'need' it or do you just need do have something that downloads and precaches the mp3 tracks? I think a lot of people already use 'SM File/Folder Downloader and Precacher' so if you can clarify if all you need is the files downloaded/precached?

RedSword 01-12-2013 08:36

Re: [Any] Random Join/Welcome Sound
 
Quote:

Originally Posted by Smffy (Post 1872072)
Do you 'need' it or do you just need do have something that downloads and precaches the mp3 tracks? I think a lot of people already use 'SM File/Folder Downloader and Precacher' so if you can clarify if all you need is the files downloaded/precached?

You need it. I'm not parsing the folder at every request; I'm stocking the filepaths in memory, so they can be easily (and quickly) retrieved, hence the need for the 2nd plugin.

SammehOsborn 02-02-2013 12:15

Re: [Any] Random Join/Welcome Sound
 
So, uuhm - I downloaded the File Management Interface but I'm not entirely sure how to set it up properly.

This is what I get in my error log,

L 02/02/2013 - 11:00:13: [SM] Plugin encountered error 25: Call was aborted
L 02/02/2013 - 11:00:13: [SM] Native "SetFailState" reported: Could not find Files Management Interface
L 02/02/2013 - 11:00:13: [SM] Displaying call stack trace for plugin "randomjoinsound.smx":
L 02/02/2013 - 11:00:13: [SM] [0] Line 33, C:\Valve\RedSourceServer\css\cstrike\addons\s ourcemod\scripting\randomjoinsound.sp::OnPlug inStart()

Some assistance maybe? xd

Thanks in advance!

RedSword 02-02-2013 15:20

Re: [Any] Random Join/Welcome Sound
 
Quote:

Originally Posted by SammehOsborn (Post 1885581)
Some assistance maybe? xd

Read first post maybe? xd

RedSword 07-01-2013 15:40

Re: [Any] Random Join/Welcome Sound
 
2 Attachment(s)
Quote:

Originally Posted by Dude0495 (Post 1981310)
When I restart my CSS server, the join sounds will not play unless I join the server & refresh the plugins. Is this normal?
Reason I post this in here on this post is because:
1. You developed both plugins.
2. The error log states that it is FMI that is the issue..

[SM] Plugin encountered error 25: Call was aborted
L 07/01/2013 - 02:00:12: [SM] Native "SetFailState" reported: Could not find Files Management Interface
L 07/01/2013 - 02:00:12: [SM] Displaying call stack trace for plugin "randomjoinsound.smx":
L 07/01/2013 - 02:00:12: [SM] [0] Line 33, C:\Valve\RedSourceServer\css\cstrike\addons\s ourcemod\scripting\randomjoinsound.sp::OnPlug inStart()
L 07/01/2013 - 06:59:39:

Since it's the second time I get someone reporting that to me I changed the way I do my checks on FMI.

(Plugin can't enter Fail State anymore)

Please try attachment.

Dude0495 07-02-2013 06:42

Re: [Any] Random Join/Welcome Sound
 
Now this is popping up in the Error log:

07/02/2013 - 05:39:29: [filesmanagementinterface.smx] readFMIFile::Couldn't find directory 'sound/everythinginthisfolderwillbeprecached'

The original issue I was having in the first place was that everytime I restarted my server, the join sound wouldn't play unless I entered the server & typed !rcon sm plugins refresh, & then it precached the sound..

Now it will not even play a sound. Did I do something wrong?


All times are GMT -4. The time now is 08:55.

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