AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Play MP3 (https://forums.alliedmods.net/showthread.php?t=183182)

imnoobsvk 04-18-2012 14:20

Play MP3
 
Hello, please how I can play mp3 from menu to all players? :attack:

NiHiLaNTh 04-18-2012 15:53

Re: Play MP3
 
Code:

new const MP3_TO_PLAY[ ] = "sound/mp3/your_fucking_sound.mp3"

public plugin_precache( )
        precache_generic( MP3_TO_PLAY );


client_cmd( 0, "mp3 play %s", MP3_TO_PLAY );


imnoobsvk 04-18-2012 17:04

Re: Play MP3
 
Quote:

Originally Posted by NiHiLaNTh (Post 1691954)
Code:

new const MP3_TO_PLAY[ ] = "sound/mp3/your_fucking_sound.mp3"

public plugin_precache( )
        precache_generic( MP3_TO_PLAY );


client_cmd( 0, "mp3 play %s", MP3_TO_PLAY );


thanks now its working :-*

imnoobsvk 04-19-2012 10:47

Re: Play MP3
 
hm only who can hear it its me :down:

how i can make it that all can hear it?

NucL3ra 04-19-2012 11:40

Re: Play MP3
 
It should work, though.

Try
PHP Code:

new playersAll[32]
get_players(Allplayers"ch")
for(new 
i;i<players;i++)
  
client_cmdAll[i], "mp3 play %s"MP3_TO_PLAY ); 

NVM, the problem is that only you have that MP3 in cstrike, most likely.

EpicMonkey 04-19-2012 12:00

Re: Play MP3
 
Quote:

Originally Posted by NucL3ra (Post 1692402)
It should work, though.

Try
PHP Code:

new playersAll[32]
get_players(Allplayers"ch")
for(new 
i;i<players;i++)
  
client_cmdAll[i], "mp3 play %s"MP3_TO_PLAY ); 

NVM, the problem is that only you have that MP3 in cstrike, most likely.

the code nihilant posted should work just fine

NucL3ra 04-19-2012 13:25

Re: Play MP3
 
As I said.
The problem is, most likely, that he does not force players to download the mp3.

mottzi 04-19-2012 15:20

Re: Play MP3
 
He surely does with precache_generic, isnt he?

imnoobsvk 04-19-2012 16:51

Re: Play MP3
 
its working, sorry, i dont put the mp3 on server, my bad :D


All times are GMT -4. The time now is 07:50.

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