AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Welcome Sound (https://forums.alliedmods.net/showthread.php?t=170330)

Experto 10-23-2011 08:17

Welcome Sound
 
4 Attachment(s)
:: Description ::

Plays sound of welcome for the players.
Allows the player to stop the sound, typing the command !stop.
Also allows register different sounds for each player.
You can register with one for each player, without having to edit files on the server, simply use the commands to register, delete and list the registered players. It is also possible to play sounds only for registered players.


:: Commands ::

// Allows the player to stop the sound, typing the command !stop in the chat
!stop

// Adds players to playlist (In console, Admin only)
//
// <steamId> : is required
// <soundFile> : is required
//
// Example: sm_wsound_add STEAM_1:2:345678 quake/entrada1.wav
//
// Note: only take effect after map change or restart the server
//
sm_wsound_add <steamId> <soundFile>

// Remove players in the playlist (In console, Admin only)
//
// Example: sm_wsound_del STEAM_1:2:345678
//
sm_wsound_del <steamId>

// Displays the list of registered players (In console, Admin only)
//
// [soundFile] : is optional. If not given, displays the complete list
//
// Example:
// sm_wsound_list
// sm_wsound_list STEAM_1:2:345678
//
sm_wsound_list [steamId]


:: Options / CVar's ::

Config file created automatically: cfg/sourcemod/welcomesound.cfg

Notes: The file welcomesound.cfg is generated in Portuguese-BR. If you need the English version replace the contents of the file "cfg/sourcemod/welcomesound.cfg" for the content of welcomesoundEN.txt available for download.

Code:

// This file was auto-generated by SourceMod (v1.3.9-dev)
// ConVars for plugin "welcomesound.smx"
 
// Announce the command !stop? [0 = No, 1 = Yes]
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_wsound_announce_stop "1"
 
// Allow the client to use the !stop and stop the sound? [0 = No, 1 = Yes]
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_wsound_client_stop "1"
 
// On / Off Sound welcome. [0 = Off, 1 = On]
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_wsound_enable "1"
 
// Address of the sound file
// -
// Default: "ambient/music/dustmusic1.wav"
sm_wsound_file "quake/entrada.wav"
 
// Stop the sound when the player chooses a team? [0 = No, 1 = Yes]
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_wsound_stop_spawn "1"
 
// Type of execution. [1 = For all, 2 = Only registered players]
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "2.000000"
sm_wsound_type "1"

:: Change log ::

>> 2.0.0 - 10/30/2011
- NEW: Allows register different sounds for each player.
- NEW: You can register with one for each player, without having to edit files on the server, simply use the commands to register, delete and list the registered players. It is also possible to play sounds only for registered players.
- NEW: Announce the command !stop

>> 1.0.0 - 10-23-2011
- Release of the plugin


:: Installation ::

- Copy the file "welcomesound.smx" to the folder "addons/SourceMod/plugins/"
- Copy the file "welcomesound.phrases.txt" to the folder "addons/SourceMod/translations/"


:: Upgrading ::

- Run the command: sm plugins unload welcomesound

- Delete the old file: "cfg/sourcemod/welcomesound.cfg"
- Delete the old file: "addons/SourceMod/translations/welcomesound.phrases.txt"

- Copy the new file "welcomesound.smx" to the folder "addons/SourceMod/plugins/"
- Copy the new file "welcomesound.phrases.txt" to the folder "addons/SourceMod/translations/"

- Run the command: sm plugins load welcomesound
or restart the server or change the map


:: Downloads ::

alex0409 10-25-2011 07:40

Re: Welcome Sound
 
I use this plugin on my l4d2 server.It works but there is a problem.
If a player connect to my server first-time he will load stuck but the file will download correctly.
He must reconnect to my server then we can play normally.
And the song will be played.
Have any idea to solve it,guys ?

Sorry about my poor English.

Experto 10-26-2011 08:10

Re: Welcome Sound
 
Quote:

Originally Posted by alex0409 (Post 1582893)
I use this plugin on my l4d2 server.It works but there is a problem.
If a player connect to my server first-time he will load stuck but the file will download correctly.
He must reconnect to my server then we can play normally.
And the song will be played.
Have any idea to solve it,guys ?

Sorry about my poor English.

I see how to resolve this detail. This is because the event that triggers the sound of welcome is called before the file download is complete.

soulreaper1o1 10-27-2011 02:02

Re: Welcome Sound
 
hay, i was wondering if u could add a feature where the plugin plays sound when a certain player joins the server.
if possible play different sounds for different players join.
Example : For "SteamID_1" it plays "blabla/blabla.wav
for "SteamID_2" it plays "blabla/blabla2.wav

Is it possible to play mp3 sounds with this ?

Cheers,
Soul Reaper

alex0409 10-27-2011 14:31

Re: Welcome Sound
 
Quote:

Originally Posted by Experto (Post 1583497)
I see how to resolve this detail. This is because the event that triggers the sound of welcome is called before the file download is complete.

Thanks for helping.

Experto 10-27-2011 18:18

Re: Welcome Sound
 
Quote:

Originally Posted by soulreaper1o1 (Post 1584020)
hay, i was wondering if u could add a feature where the plugin plays sound when a certain player joins the server.
if possible play different sounds for different players join.
Example : For "SteamID_1" it plays "blabla/blabla.wav
for "SteamID_2" it plays "blabla/blabla2.wav

Is it possible to play mp3 sounds with this ?

Cheers,
Soul Reaper

Yes, is possible to play mp3! :)

I will add what you asked in the next version

But remember that all sounds will be downloaded by all players who enter the server.. 8)

soulreaper1o1 10-27-2011 18:24

Re: Welcome Sound
 
Quote:

Originally Posted by Experto (Post 1584533)
But remember that all sounds will be downloaded by all players who enter the server.. 8)

the sounds will be downloaded once not every time the sound plays right ?
and when exactly is the next version going to be released...i kinda need it right now.

Experto 10-27-2011 21:49

Re: Welcome Sound
 
the new version will be released until the day 10/31/2011

petronio 10-28-2011 09:23

Re: Welcome Sound
 
hi

we can place custom sound?

Experto 10-28-2011 18:15

Re: Welcome Sound
 
Quote:

Originally Posted by petronio (Post 1584890)
hi

we can place custom sound?

Yes!!! :)


Place the sound file in the folder "sound" of your server and set the address in the variable sm_wsound_file,
within the file "welcomesound.cfg"
which is in the "cfg/SourceMod"

No need to put "sound" before the address of the file.
example:

sm_wsound_file "quake/entrada.wav"

The above file is inside the folder "sound/quake"


All times are GMT -4. The time now is 10:32.

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