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

Music Menu Advance


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff        Approver:   Johnny got his gun (102)
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 04-05-2005 , 08:40   Music Menu Advance
Reply With Quote #1

Music Menu Advance v3.07

Description:
Open the background music list set on the server from the menu and play the MP3 file on the client side.

This plug-in reinforced a former plug-in.
http://forums.alliedmods.net/showthread.php?t=5365

Modules:
  • [required]: AMXMODX v1.9.0 (split_string function does not exist in v1.8.2)
  • (3.03alpha:1.8.2 and cromchat.inc)
Usage:
  • Introduce the INI file which described a MP3 file in the Config dir. "addons/amxmodx/configs/bgmlist.ini"
  • and all mp3 files in "[modname_directory]/" folder.
  • Edit INI file
    • "music title";"[directory]/[mp3 filename]";"[TIME FORMAT MM:SS]"

      example:
      Code:
      example:
      HL-BGM 01;media/Half-Life01.mp3;02:12
      HL-BGM 02;media/Half-Life02.mp3;01:47
      ...
      Registration is possible.
      file path 64, and title 32 characters.

      the precache of the mp3s automatic
  • Attention: Please note that the maximum number that can be precached is 512.

Cvars:
  • amx_mma_loadingsong
    • loadingsong 1 to on , 0 to off.
  • amx_mma_round
    • round bgm 1 to on, 0 to off.

Commnads:
  • amx_mma_play <BgmNumber> - server bgm starting
  • say "/mma" or "/bgm" - shows a menu of a Music commands.
  • say "/mma config" or "/bgm config" - shows a menu of a config commands.
  • say "/mma next" or "/bgm next"
  • say "/mma back" or "/bgm back"
  • say "/mma stop" or "/bgm stop"

Code:
v3.07
Added: Comment and Empty line Check 
(Metamod-R bug fix wrapping.)

v3.06
Added: version check.

v3.05
Added: Say Commands.

v3.04
Added: /mma config
Added: Playback playlist.
Added: Loop.
Added: Show Time bar.
Added: Auto Play BGM.

v3.02
Fixed 1.9.0 compile error.

v3.01
Fixed precache bug.
Using fopen/fgets/fclose.
Remove maximum song limit. 
Change separator to semicolon. (can use space character.)
 
v3.00
Replace for new menu system.

v2.60
fix easy miss...
 
v2.59
use pcvar
cut engine module.
 
v2.58
Any code changed.
 
v2.56
The addition of the server command.
It is poor at English....
old v2.56 4877 views thanks

sample ini file here. all valve mp3 files.

GitHub: https://github.com/AoiKagase/Amxx-MusicMenuAdvance
Attached Files
File Type: ini bgmlist.ini (578 Bytes, 393 views)
File Type: sma Get Plugin or Get Source (mma303a.sma - 689 views - 6.6 KB)
File Type: zip mma307.zip (11.8 KB, 377 views)
__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 12-07-2020 at 19:16. Reason: v3.07 Release
+ARUKARI- is offline
Proach
Veteran Member
Join Date: Jan 2005
Location: The Netherlands
Old 04-05-2005 , 11:13  
Reply With Quote #2

reaaly nice

tx m8
Proach is offline
Send a message via ICQ to Proach
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 04-05-2005 , 12:25  
Reply With Quote #3

So this is an admin command to play diffrent songs and how big and long can each song be?
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 04-05-2005 , 13:54  
Reply With Quote #4

Probably limited by the file size limit of the server and clients.
Don't think anyone would want to precache gigabytish mp3s.
Johnny got his gun is offline
TiMbErLaNd
Senior Member
Join Date: Jan 2005
Location: Detroit, Michigan
Old 04-05-2005 , 15:10  
Reply With Quote #5

do i need another plugin to actually get this for the clients to download - or should i just drop it in my misc/ dir then setup the bgmlist.ini with misc/soundfile.mp3

it would be nice if this had another dir such as bgm/ for the custom files aside from the hl.mp3's then set it up to precache from that dir - im sorry about my ignorance with this - but its a ported amx .sma and the code isnt as good lookin as a new plugin its harder for me to follow what does what or what i need to change in the .sma to get it to do what i want. this would also be better if the .mp3's would LOOP so you dont have to goto the music menu over and over, just a thought

does anyone even understand what im talkin about?? lol
TiMbErLaNd is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-05-2005 , 16:06  
Reply With Quote #6

You don't need another plugin to precache the files. It simply reads the files from bgmlist.ini and does it automatically.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 04-05-2005 , 17:24  
Reply With Quote #7

Arukari:
Well like I said earlier in some other post (http://forums.alliedmods.net/showthr...=102390#106242) this can be done without the need for ini files... So you can just drop the files into a dir and precaching and everything else will be handled auto... well... Guess it's not necessary. But I tend to dislike hard coding when things can be done in a neater way. Guess some ppl like lots of cfg files though.

You should also use plugin_modules like this:
Code:
public plugin_modules() {     require_module("engine") }

分かりました?日本語が難しいです。
Johnny got his gun is offline
TiMbErLaNd
Senior Member
Join Date: Jan 2005
Location: Detroit, Michigan
Old 04-05-2005 , 17:31  
Reply With Quote #8

so lets say i create folder sound/bgm/ then the file is soundfile.mp3 are you tellin me that its going to send the file to the clients?

his example
media/half-life02.mp3
media/half-life03.mp3

now those are files everyone already has - but addin new ones to the mix - what should my ini be
sound/bgm/soundfile.mp3 ???
bgm/soundfile.mp3 ???

again do i have to put it in the misc/ folder ??? that media/ refers to the clients media/ folder

you answer my post yet give me no information the answers i really wanted, if anyone can assist me id be great.

*EDIT* Johnny you were postin when i was - if you can help id apreciate it - again that ported amx file is crummy to read with that .sma
TiMbErLaNd is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 04-05-2005 , 20:02  
Reply With Quote #9

Quote:
Originally Posted by Johnny got his gun
Arukari:
Well like I said earlier in some other post (http://forums.alliedmods.net/showthr...=102390#106242) this can be done without the need for ini files... So you can just drop the files into a dir and precaching and everything else will be handled auto... well... Guess it's not necessary. But I tend to dislike hard coding when things can be done in a neater way. Guess some ppl like lots of cfg files though.
mmm...It found out somehow.
But, it is too difficult for me.
Quote:
Originally Posted by Johnny got his gun
You should also use plugin_modules like this:
Code:
public plugin_modules() {     require_module("engine") }

分かりました?日本語が難しいです。
thanks! I forgot to write that completely.

Quote:
Originally Posted by TiMbErLaNd
now those are files everyone already has - but addin new ones to the mix - what should my ini be
sound/bgm/soundfile.mp3 ???
bgm/soundfile.mp3 ???
You should add that like this in bgmlist.ini if you put a mp3 file on sound/bgm/.
Code:
"sound/bgm/sound.mp3"
double quotation shouldn't be necessary.
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
-=E[M]=-INVISIBLE
Junior Member
Join Date: Apr 2005
Location: Palmdale, CA
Old 04-19-2005 , 15:10  
Reply With Quote #10

um...imma first time poster and um ya i got this plugin the menu shows the song downloads and everything and when i get the menu i press 1 for BGM1 and it says its playin but...um...its not.... could some one tell me y plz
__________________
-=E[M]=-INVISIBLE is offline
Send a message via AIM to -=E[M]=-INVISIBLE Send a message via MSN to -=E[M]=-INVISIBLE Send a message via Yahoo to -=E[M]=-INVISIBLE
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 07:19.


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