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
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;
}
Show onplayerkeystatechange code.
OnPlayerKeyStateChange have too many lines.
Try searching it under OnPlayerExitVehicle then, if it's hard to find, why not press Control + F, search for
and delete them if not needed? You might have put that line somewhere, which is not needed for you.