Raised This Month: $ Target: $400
 0% 

Loadingsong (play a song during the connection to server)


Post New Thread Reply   
 
Thread Tools Display Modes
Mrshiftyswitchblade
Member
Join Date: Jun 2004
Location: Buffalo, NY
Old 08-01-2004 , 15:23  
Reply With Quote #21

Code:
#include <amxmodx> 



public plugin_precache() { 
   precache_sound("misc/nlk.mp3") 
   return PLUGIN_CONTINUE 
} 


public client_connect(id) { 
   client_cmd(id,"mp3 play sound/misc/nlk.mp3") 
   return PLUGIN_CONTINUE 
} 



public plugin_init() { 
   register_plugin("azure demo","1.0","Amxx Newbie") 
   return PLUGIN_CONTINUE
I also tried this
__________________
Mrshiftyswitchblade is offline
Send a message via AIM to Mrshiftyswitchblade Send a message via MSN to Mrshiftyswitchblade
cyko
Member
Join Date: Mar 2004
Old 08-24-2004 , 03:35  
Reply With Quote #22

Change:

Code:
new soundlist[Maxsounds][] = {"Half-Life01","Half-Life02","Half-Life04","Half-Life12","Half-Life13","Half-Life17"}

to

Code:
new soundlist[Maxsounds][] = {"name_of_your_file","name_of_next_file"}

note the fact that there is no .mp3 extension same as the author's original example.
cyko is offline
eisbein
Senior Member
Join Date: Aug 2004
Location: Germany/Rendsburg
Old 09-16-2004 , 11:51  
Reply With Quote #23

Code:
#include <amxmodx> #include <engine> #define Maxsounds 2 //Wieviele Sounds new soundlist[Maxsounds][] = {"eisbein","lol"} //eisbein.mp3 und lol.mp3 in den Ordner >>sound/eisbein/<< public client_connect(id) {    new i    i = random_num(0,Maxsounds-1)    client_cmd(id,"mp3 play sound/eisbein/%s",soundlist[i])    return PLUGIN_CONTINUE } public plugin_precache ()         {    new a    for(a = 0; a < Maxsounds; ++a){       new msg[128]       format(msg,127,"sound/eisbein/%s.mp3", soundlist[a])       precache_generic( msg )    }    return PLUGIN_CONTINUE } public plugin_init() {    register_plugin("Connect","1.2","Eisbein")    return PLUGIN_CONTINUE }
__________________
eisbein is offline
Send a message via ICQ to eisbein
n-o-l-o
Member
Join Date: Sep 2004
Location: Germany
Old 09-28-2004 , 19:27   thx 4 this plugin and here is my modification
Reply With Quote #24

Code:
/* * AMXX Plugin by n-o-L-o * * Play a sound during the connection. * Trigger the same sounds in game. * * Random code part taken from plugin * ·connectsound by White Panther * ·loadingsound by [OSA]Odin and eisbein * * v1.5 * */ #include <amxmodx> #include <engine> #define Maxsounds 2 // sounds localized in gcf cache (valve/media) // you can add more song if you want. new soundlist[Maxsounds][] = {"mp3_1","mp3_2"} new i = Maxsounds+1 public plugin_init() {     register_plugin("Loading Sound","1.5","compu_noLo")     register_concmd("mukke","sayMukke",0,"- play a MP3")     register_concmd("mukke stop","sayMukkeStop",0,"- stop the MP3")     return PLUGIN_CONTINUE } public plugin_precache() {     if(i == Maxsounds+1) i = random_num(0,Maxsounds-1)     new msg[128]     format(msg,127,"sound/misc/%s.mp3", soundlist[i])     precache_generic( msg )     return PLUGIN_CONTINUE } public client_connect(id) {     client_cmd(id,"mp3 play sound/misc/%s",soundlist[i])     return PLUGIN_CONTINUE } public sayMukke(id) {     i = random_num(0,Maxsounds-1)     client_cmd(id,"mp3 play sound/misc/%s",soundlist[i])     client_print(id,print_chat,soundlist[i])     return PLUGIN_CONTINUE } public sayMukkeStop(id) {     client_cmd(id,"mp3 play sound/misc/doesnt/exist")     client_print(id,print_chat,"MP3 stopped.")     return PLUGIN_CONTINUE }

not tested yet, but no errors found.

edit: i want an 'if' to check if the file exists. anyone?
n-o-l-o is offline
FroXeN
Senior Member
Join Date: Apr 2004
Location: Freecode is a loser.
Old 09-29-2004 , 03:04  
Reply With Quote #25

i love this plugin. Very Nice. Elevator music would be better
__________________
Looking for friends!!!

http://Ms-Proxy.Com Join the fun!
FroXeN is offline
Send a message via ICQ to FroXeN
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 09-29-2004 , 12:13  
Reply With Quote #26

Wow, I must have been on vacation and didnt see this plugin until now.

"What a good idea for a plugin, I thank you for giving me something better then that other music.

I think im going to place some "Move B*tch" by Ludacris, that song tends to get people hype
__________________

BigBaller is offline
ancient1
Senior Member
Join Date: Jul 2004
Location: UK
Old 10-01-2004 , 06:10  
Reply With Quote #27

Only seems to play a sound 20-40% of the time when connecting, other times nothing?

Weird...

Ancient
__________________
ancient1 is offline
Cool438
Member
Join Date: Mar 2004
Old 10-06-2004 , 18:05  
Reply With Quote #28

Ok so how would I make this plugin play Half-Life01.mp3 over again? I did this and there is no sound connecting to my server.

Code:
/* * Play a sound during the connection. * * Random code part taken from plugin * connectsound by White Panther * * v1.0 * */ #include <amxmodx> #define Maxsounds 6 // sounds localized in gcf cache (valve/media) // you can add more song if you want. new soundlist[Maxsounds][] = {"Half-Life01","Half-Life01","Half-Life01","Half-Life01","Half-Life01","Half-Life01"} public client_connect(id) {     new i     i = random_num(0,Maxsounds-1)     client_cmd(id,"mp3 play media/%s",soundlist[i])     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("Loading Sound","1.0","Amxx User")     return PLUGIN_CONTINUE }
Yes, I know the newsoundlist[Maxsounds][]= is two line but in the .sma file it's one line.
Cool438 is offline
core-
New Member
Join Date: Nov 2004
Location: DE
Old 11-24-2004 , 14:01  
Reply With Quote #29

This plugin works nice for me. Im using an mp3 file which is downloaded from web with the sv_downloadurl and a .res file. It works fine, but i still wonder if its possible to play also .wav files? I tried change a bit in the code not mp3 play seperate wav play, but it dont work. So is it possible?
__________________
=> Im just a user of amxx
=> Maybe sometimes i find a nice tut to learn small to code my own stuff ^^
core- is offline
Send a message via ICQ to core- Send a message via MSN to core-
USteppin
Junior Member
Join Date: Jun 2004
Old 01-08-2005 , 18:54  
Reply With Quote #30

great plugin, ive been using the mp3 precache thru sv_downloadurl option you posted on the first page, but im getting this error:

Missing RIFF/WAVE chunks 8 times in the console, did i edit the code wrong or is it something with the mp3 im using thats causing it, or should i not be worried about?
USteppin is offline
Reply



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 23:15.


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