Raised This Month: $ Target: $400
 0% 

mp3 or radio on server, when you are dead


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
feri_crosby
Junior Member
Join Date: Feb 2009
Old 02-24-2009 , 06:37   mp3 or radio on server, when you are dead
Reply With Quote #1

hi, i m from slovakia, a please, help me with my server. I want, when m i dead, mp3 or radio is playing(those players who are dead=play mp3 or radio) , a dont now, how it make?? pleasee

Last edited by feri_crosby; 02-24-2009 at 06:41.
feri_crosby is offline
eagle.eye
Junior Member
Join Date: Feb 2009
Old 02-25-2009 , 06:19   Re: mp3 or radio on server, when you are dead
Reply With Quote #2

hey mate,

i can help ya but u gotta be more specific

it is all easy

id recomend using a server based menu such as where a client types menu and a list of options comes up

such as radio or a list of mp3 songs

or if u dont like the menu u can do it where a client types a command and it comes up with wat ya want

if u want radio ,, make sure u got webbased radio station to redirct it to

i recentyl just finished making one of these ,, a menu based radio sytem

but u might not like as it is all the american stations.

i leave it up to ya

u chose between the radio or mp3 and also chose weather u want the menu or the commands

talk soon

+ KARMA
eagle.eye is offline
feri_crosby
Junior Member
Join Date: Feb 2009
Old 02-25-2009 , 10:27   Re: mp3 or radio on server, when you are dead
Reply With Quote #3

hmm, i dont now. is any plugin for it? because a cant making plugins or menus..fot radio..or mp3..thanks
feri_crosby is offline
eagle.eye
Junior Member
Join Date: Feb 2009
Old 02-25-2009 , 21:34   Re: mp3 or radio on server, when you are dead
Reply With Quote #4

ok then ill do it for u

tell me which 1 u want.. is it the mp3 songs or the ingame radio

u have to chose 1 . if its the radio give me the link to the radio stations that u want to b on the server
eagle.eye is offline
feri_crosby
Junior Member
Join Date: Feb 2009
Old 02-26-2009 , 04:05   Re: mp3 or radio on server, when you are dead
Reply With Quote #5

hi, oks thanks, radio is this:
by winamp-shoutcast: http://194.158.114.66:5000
please this radio when is dead player, is playing... thankss
feri_crosby is offline
eagle.eye
Junior Member
Join Date: Feb 2009
Old 02-26-2009 , 06:23   Re: mp3 or radio on server, when you are dead
Reply With Quote #6

idk if its possible to make when the player is dead that it automatically plays

but i no i can give the cleints a option to listen to the song

can be trought a menu

or it can be a word they type
like in chat they say /radio

so it wont be automatic only when when they chose to listen

can u get me a windows media player version of this radio station it would be much easier if u cant than its ok.
eagle.eye is offline
feri_crosby
Junior Member
Join Date: Feb 2009
Old 02-26-2009 , 07:07   Re: mp3 or radio on server, when you are dead
Reply With Quote #7

hmm..so...please..make any plugin or i dont now what...but radio must be playing when is player dead...radio is not sure...any mp3 or i dont now...please..
feri_crosby is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-26-2009 , 09:48   Re: mp3 or radio on server, when you are dead
Reply With Quote #8

PHP Code:
#pragma semicolon 1
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "MP3 on Death"
#define AUTHOR "YamiKaitou"
#define VERSION "1.0"
#define SOUND "path/to/song.mp3" // do not include the sound/ part, include only what comes after it

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
RegisterHam(Ham_Spawn"player""playerSpawn"1);
    
RegisterHam(Ham_Killed"player""playerKilled"1);
}

public 
plugin_precache()
    
precache_sound(SOUND);

public 
playerSpawn(id)
    
client_cmd(id"mp3 stop");

public 
playerKilled(id)
    
client_cmd(id"mp3 play ^"%s^""SOUND); 
Should work, untested though. Change the sound by editing the SOUND define in the code
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 02-26-2009 at 10:01.
YamiKaitou is offline
feri_crosby
Junior Member
Join Date: Feb 2009
Old 02-26-2009 , 10:50   Re: mp3 or radio on server, when you are dead
Reply With Quote #9

hmm..jea..thankss.but i m small laming man, please, where mast it put? or instalation text please. thanks
feri_crosby is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 02-26-2009 , 10:57   Re: mp3 or radio on server, when you are dead
Reply With Quote #10

He told you how to set it up...

But this is how you do it...
First change "#define SOUND "path/to/song.mp3" To the path to your .mp3 file.
Then compile the plugin using the compiler that you (should) have in your scripting folder.
Then you cut the .amxx file from scripting/compiled and paste it in plugins folder.
Then you write it in configs/plugins.ini.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
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 12:48.


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