23.12.2012, 08:48
(
Последний раз редактировалось R9; 23.12.2012 в 09:36.
)
Hi, I find this "MP3 Music Player Filter Script" in my data. I think it was taken from the forum here. My question now is how can I add new songs?
NEW PROBLEM:
Now I have another problem that is when I type /mp3 0 then the music turned off, but it does not do it, how I fixed it?
NEW PROBLEM:
Now I have another problem that is when I type /mp3 0 then the music turned off, but it does not do it, how I fixed it?
Quote:
// MP3 Music Player #include <a_samp> #include <zcmd> #define COLOR_GRAY 0xBFC0C2FF #include <foreach> #define COLOR_PURPLE 0xC2A2DAAA #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print("MP3 Music Player"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print("SHUTING DOWN THE MP3 PLAYER NOO!"); print("----------------------------------\n"); } #endif stock GetPlayerNameEx(playerid) { new pName[25]; GetPlayerName(playerid, pName, sizeof(pName)); return pName; } CMD:mp3(playerid, params[]) { if(isnull(params)) { SendClientMessage(playerid, COLOR_GRAY, "{99FFFF}USAGE: /mp3 [Music ID] (0 - Turn of the MP3 Player.)"); SendClientMessage(playerid, COLOR_GRAY, "{99FFFF}(1)Gangnam Style{330000}<!>{99FFFF} (2)Eminem No Love (3)The Cataracs Top Of The World (4)Stupid Motha Fucka (5)Pumped Up Kicks (6)Eminem - Not Afraid"); SendClientMessage(playerid, COLOR_GRAY, "{99FFFF}(7)Young wild and free ( ![]() SendClientMessage(playerid, COLOR_GRAY, "{99FFFF}(13)Bruno Mars billionaire(14) Eminem - Yellow Brick Road"); return 1; } new string[128]; switch(strval(params)) { case 0: { format(string, sizeof(string), "* %s dips his hands into his pockets turning the mp3 player off.",GetPlayerNameEx(playerid)); foreach(Player, i) if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)){ StopAudioStreamForPlayer(i); } } case 1: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Gangnam Style' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_m9v2ujdS2q1r5dxz2o1.mp3"); } case 2: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Eminem No Love' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://a1.radioplanet.tv/2010/06/EminemLilWayneNoLove.mp3"); } case 3: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'The Cataracs Top Of The World' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://yusuke69.free.fr/Musique/Top-of-the-World.mp3"); } case 4: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Stupid Motha Fucka' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://mediacloud.whirled.com/67f791aebe765f71d8fd82bd19de58b1c05bd27e.mp3"); } case 5: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Pumped Up Kicks' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://www.colorsandthings.com/wp-content/uploads/2011/02/Pumped-Up-Kicks.mp3"); } case 6: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Eminem Not Afraid' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://iwapsex.org/newvideo/mz/eminem-not_afraid_64.mp3"); } case 7: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Young wild and free' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_lnnwbxHZNk1qdqek9o1.mp3"); } case 8: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Wild Ones' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://sportsrantz.com/biggtv/files/2012/04/wild-ones-flo-rida.mp3"); } case 9: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Sexy Bitch' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://www.hulkshare.com/dl/zn5nnt9gjqmj/sexy_bitch.mp3"); } case 10: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Akon - Lonely' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://www.fizzlive.com/media/uploads/2/1/7/9/67059/audio_67059hzynfcruq16brpfucncrax7.mp3"); } case 11: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Bruno Mars - Runaway Baby' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://04.media.v4.skyrock.com/music/044/809/044809719a00e2b41cfc102152432295.mp3"); } case 12: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Bruno Mars - The lazy Song!' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://1cd.palco.fm/1/1/7/d/divulgamixsound--the-lazy-song.mp3"); } case 13: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Bruno Mars billionaire' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://rbebenek.com/music/US_Top_40_9-18-2010/23-travie_mccoy_feat._bruno_mars_-_billionaire.mp3"); } case 14: { format(string, sizeof(string), "* %s Dips his hand into his pocket taking out a mp3 player, turning 'Eminem - Yellow Brick Road' Song on.",GetPlayerNameEx(playerid)); PlayAudioStreamForPlayer(playerid, "http://www.btc.co.uk/jim/yellow.mp3"); } default: return SendClientMessage(playerid, COLOR_GRAY, "{330000}<!>{99FFFF}Invalid station specified."); } ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); return 1; } public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5) { if(IsPlayerConnected(playerid)) { new Float ![]() ![]() ![]() new Float ![]() ![]() ![]() new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) { SendClientMessage(i, col1, string); } else if (((tempposx < radi/ ![]() ![]() ![]() ![]() ![]() ![]() { SendClientMessage(i, col2, string); } else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) { SendClientMessage(i, col3, string); } else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) { SendClientMessage(i, col4, string); } else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { SendClientMessage(i, col5, string); } } else { SendClientMessage(i, col1, string); } } } return 1; } |