Raised This Month: $66 Target: $400
 16% 

MP3 + Wav Player W/ music.ini Precacher


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff        Approver:   Geesu (62)
eFrigid
Senior Member
Join Date: Aug 2005
Location: 3o3
Old 09-12-2005 , 00:31   MP3 + Wav Player W/ music.ini Precacher
Reply With Quote #1

This plugin is a simple MP3 + Wav Player that also includes a music.ini file that you use to list the songs (download below and place into addons/amxmodx/configs folder).
Place the song names into music.ini and then place the songfile into your sound/music directory (may have to make this directory).
Then just use the following commands in association with these songs.

Commands:
amx_play - <Part Of Filename>
amx_playlist - Displays a list of sounds/music in the server playlist.
amx_stopplay - Stops currently playing sound/music.
say /stop - Client command to stop the currently playing sound/music.

Max Sounds/Songs Allowed in the music.ini file:
10 (Change this value with the #define inside of the script)

Admin Flags:
"q"

Modules:
None

Examples of music.ini usage:

music.ini:
Quote:
bad_song.mp3
cool_song.mp3

YMCA.mp3
birds.wav
These sound files should then be located in your sound/music folder. If you append(add a song to) the music.ini file, the sound/music will not be playable untill map change.

Note: Because every user must download the songs from your server when they join and most normal .mp3 files are twice the size of KZ maps, I suggest only adding small sounds and songs which are usually in .wav format.

Mad amounts of props to GHW_Chronic

Yay i got it once AGAIN!!!
Attached Files
File Type: zip music_ini_in_here.zip (116 Bytes, 18195 views)
File Type: sma Get Plugin or Get Source (mp3-wav_player.sma - 22641 views - 3.0 KB)
__________________
lol
eFrigid is offline
Send a message via AIM to eFrigid Send a message via MSN to eFrigid Send a message via Skype™ to eFrigid
pdoubleopdawg
Senior Member
Join Date: Aug 2005
Old 09-12-2005 , 00:54  
Reply With Quote #2

Instead of giving the user the file to put there, just add this in.

Code:
public plugin_init() {     write_configfile() } public write_configfile() {     if(!file_exists(configfile)) {         write_file(configfile,"// First time user",-1)         return PLUGIN_CONTINUE     } }
pdoubleopdawg is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 09-12-2005 , 00:59  
Reply With Quote #3

yes, because .116 kbs is such a large download that we may just die. Besides, when installing the plugin, you wold have to wait till mapchange for the ini file to be created. who wants to have to wait till the map changes to set-up the plugin? This way it can be added without having to add the .amxx then changemap then apend the music.ini. Remember: simplest==best
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
pdoubleopdawg
Senior Member
Join Date: Aug 2005
Old 09-12-2005 , 01:01  
Reply With Quote #4

Just a suggestion chronic..
(I really hope you didn't - my karma over that. I had +4..)
pdoubleopdawg is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 09-12-2005 , 01:03  
Reply With Quote #5

i cant minus 3 karma -_-
i didnt, i aint gota a problem w/ u man, i think ur cool, just not a good suggestion.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
pdoubleopdawg
Senior Member
Join Date: Aug 2005
Old 09-12-2005 , 01:04  
Reply With Quote #6

Oh, and where do you get your logic that it will take a mapchange for that? (I think it's simpler to add that, so the user doesn't have to handle the complexities of placing a file in his configs dir.)
pdoubleopdawg is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 09-12-2005 , 01:09  
Reply With Quote #7

my logic is when you add a plugin it does not load till mapchange, so thus that would not create the file till...hmm. mapchange?!
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 09-12-2005 , 01:17  
Reply With Quote #8

look

my version:
add .amxx file
add .ini file
append .ini file
add sounds
on mapchange the plugin loads and is ready to go

your version:
add .amxx file
go into server or HLSW
change map
go back to ftp or folder
add sounds
append .ini file
when map changes again plugin is ready to go
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
pdoubleopdawg
Senior Member
Join Date: Aug 2005
Old 09-12-2005 , 01:24  
Reply With Quote #9

My Version:
- Add .AMXx file
- alias restart "meta unload amxmodx_mm.dll;meta load amxmodx_mm.dll"
- restart
- add sounds
- Append .ini file.


It's an opinion, I'm stopping here because this looks like it's a little more than friendly suggestions.
pdoubleopdawg is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 09-12-2005 , 01:34  
Reply With Quote #10

Quote:
Originally Posted by pdoubleopdawg
- alias restart "meta unload amxmodx_mm.dll;meta load amxmodx_mm.dll"
So much simpler. I mean, adding a .ini file verses going into the server and reloading amxmodx and then going back to the ftp . You're such a genius. How does he do it?
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
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 04:32.


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