AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   mp3 or radio on server, when you are dead (https://forums.alliedmods.net/showthread.php?t=86332)

feri_crosby 02-24-2009 06:37

mp3 or radio on server, when you are dead
 
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

eagle.eye 02-25-2009 06:19

Re: mp3 or radio on server, when you are dead
 
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 :shock:

feri_crosby 02-25-2009 10:27

Re: mp3 or radio on server, when you are dead
 
hmm, i dont now. is any plugin for it? because a cant making plugins or menus..fot radio..or mp3..thanks

eagle.eye 02-25-2009 21:34

Re: mp3 or radio on server, when you are dead
 
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

feri_crosby 02-26-2009 04:05

Re: mp3 or radio on server, when you are dead
 
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

eagle.eye 02-26-2009 06:23

Re: mp3 or radio on server, when you are dead
 
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.

feri_crosby 02-26-2009 07:07

Re: mp3 or radio on server, when you are dead
 
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..

YamiKaitou 02-26-2009 09:48

Re: mp3 or radio on server, when you are dead
 
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

feri_crosby 02-26-2009 10:50

Re: mp3 or radio on server, when you are dead
 
hmm..jea..thankss.but i m small laming man, please, where mast it put? or instalation text please. thanks

DarkGod 02-26-2009 10:57

Re: mp3 or radio on server, when you are dead
 
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.


All times are GMT -4. The time now is 17:28.

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