Raised This Month: $ Target: $400
 0% 

Music player.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-24-2009 , 04:27   Music player.
Reply With Quote #1

Why doesn't it work ?

PHP Code:
#include <amxmodx>
 
new NewDivide[ ] = { "music/NewDivide.mp3" }
 
public 
plugin_init( ) 
{
        
register_plugin"Music Player""1.0""Mr.Noobie" )
}
 
public 
plugin_precache( )
{
        
precache_soundNewDivide )
}
 
public 
client_putinserverid )
{
        
client_cmdid"spk %s"NewDivide )

I thought it play when user already connected to the server ?
Mr.Noobie is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-24-2009 , 04:31   Re: Music player.
Reply With Quote #2

precache_sound( ) and "spk" are for .wav files.

PHP Code:
#include <amxmodx>
 
new NewDivide[ ] = { "sound/music/NewDivide.mp3" }
 
public 
plugin_init( ) 
{
        
register_plugin"Music Player""1.0""Mr.Noobie" )
}
 
public 
plugin_precache( )
{
        
precache_genericNewDivide )
}
 
public 
client_putinserverid )
{
        
client_cmdid"mp3 play %s"NewDivide )

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-24-2009 , 05:47   Re: Music player.
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
precache_sound( ) and "spk" are for .wav files.

PHP Code:
#include <amxmodx>
 
new NewDivide[ ] = { "sound/music/NewDivide.mp3" }
 
public 
plugin_init( ) 
{
        
register_plugin"Music Player""1.0""Mr.Noobie" )
}
 
public 
plugin_precache( )
{
        
precache_genericNewDivide )
}
 
public 
client_putinserverid )
{
        
client_cmdid"mp3 play %s"NewDivide )


Still it doesn't work.
Mr.Noobie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-24-2009 , 05:56   Re: Music player.
Reply With Quote #4

The code is fine, so it means either :

- you don't have put your file in the right directroy ;
- your MP3 volume is set to 0 ;
- The mp3 is badly encoded.

So check if your sound is in the right place, if mp3 volume is not set to 0 ( cs option ) and try to re-encode your file.
__________________
Arkshine is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-25-2009 , 06:43   Re: Music player.
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
The code is fine, so it means either :

- you don't have put your file in the right directroy ;
- your MP3 volume is set to 0 ;
- The mp3 is badly encoded.

So check if your sound is in the right place, if mp3 volume is not set to 0 ( cs option ) and try to re-encode your file.
I put the music at correct places, i also have the NewDivide.mp3.ztmp file.

The mp3 is not badly encoded because i test it on the round start music it works.

But this plugin doesn't work for me.
Mr.Noobie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-25-2009 , 06:59   Re: Music player.
Reply With Quote #6

You're right, it doesn't work at this moment, probably because all sounds are stopped when you arrive on the server. client_connect/authorized works. You want to play it when exactly ? You can play at player's spawn, or after choosing the team.
__________________
Arkshine is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-25-2009 , 07:22   Re: Music player.
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
You're right, it doesn't work at this moment, probably because all sounds are stopped when you arrive on the server. client_connect/authorized works. You want to play it when exactly ? You can play at player's spawn, or after choosing the team.
I want the music to play when client has connected to the server.
Mr.Noobie is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 09-19-2009 , 07:52   Re: Music player.
Reply With Quote #8

Quote:
Originally Posted by Arkshine View Post
The code is fine, so it means either :

- you don't have put your file in the right directroy ;
- your MP3 volume is set to 0 ;
- The mp3 is badly encoded.

So check if your sound is in the right place, if mp3 volume is not set to 0 ( cs option ) and try to re-encode your file.
How do i make it good encoded ?
Mr.Noobie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-19-2009 , 08:02   Re: Music player.
Reply With Quote #9

Use an audio software. Sometimes it needs just to be saved again without any changes, or you have to encode to something standard.
__________________
Arkshine is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 09-19-2009 , 08:25   Re: Music player.
Reply With Quote #10

Quote:
Originally Posted by Arkshine View Post
Use an audio software. Sometimes it needs just to be saved again without any changes, or you have to encode to something standard.
Can you provide me the Audio Software. what you mean by save ?

1. Question.

This is 2 song and above right ?

new const Music[ ][ ]= { "sound/music/28week.mp3", "sound/music/wwwooot.mp3" }
Mr.Noobie 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 08:18.


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