06.07.2015, 12:56
Hello, i make a radio system and i have one problem , when type /music it's all fine, but when i press 'F' Radio Stop, and i don't want this
CMD
= REP
PHP код:
if(dialogid == DIALOG_MP3)
{
if(response)
{
if(listitem == 0)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Opreste MP3", 4000, 5);
RemovePlayerAttachedObject(playerid, 4);
return 1;
}
if(listitem == 1)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio ProFm", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://stream.profm.ro:8012/profm.mp3");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 3)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Taraf", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://radiotaraf.no-ip.biz:7100");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 4)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio ZU", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://stream.radiozu.ro:8020/");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 5)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Kiss FM", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://80.86.106.136:80");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 6)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Hot Style", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://radiohot.ro/live.m3u");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 7)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Intens", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://live.radiointens.ro:8020");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 8)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Romania Hip-Hop", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://radioromanian.net/hiphop.pls");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 9)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Romania Manele", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://radioromanian.net/manele.pls");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 10)
{
StopAudioStreamForPlayersInCar(vehicleid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Romania Popular", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://radioromanian.net/popular.pls");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 11)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio GMusic Rock", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://www.radiogmusic.com/rock.m3u");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 12)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Mafia", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://www.radiomafia.ro/listen.m3u");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
if(listitem == 13)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Radio Greu de Difuzat", 4000, 5);
PlayAudioStreamForPlayer(vehicleid,"http://www.greudedifuzat.eu/greudedifuzat.m3u");
SetPlayerAttachedObject(playerid, 4, 19421, 2, 0.050000, -0.014999, 0.000000, 95.000000, 183.000000, 89.000000, 1, 1, 1, 0xffffffff);
return 1;
}
}
return 1;
}
PHP код:
CMD:music(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti logat!");
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMp3] == 1)
{
ShowPlayerDialog(playerid, DIALOG_MP3, DIALOG_STYLE_LIST, "MP3 Music:", "Opreste MP3\nPro FM\nRadio Bandit\nRadio Taraf\nRadio ZU[Audio Plugin]\nKiss FM[Audio Plugin]\nRadio Hot Style\nRadio Intens\nRadio Romanian Hip-Hop\nRadio Romanian Manele\nRadio Romanian Popular\nRadio GMusic Rock\nRadio Mafia\nRadio Greu de Difuzat", "Select", "Cancel");
}
else
{
SCM(playerid, -1, "Nu detii MP3! Du-te la un 24/7 pentru a cumpara unul.");
return 1;
}
}
return 1;
}