Radio system
#1

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"40005);
                
RemovePlayerAttachedObject(playerid4);
                return 
1;
            }
            if(
listitem == 1)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio ProFm"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://stream.profm.ro:8012/profm.mp3");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);                
                return 
1;
            }
            if(
listitem == 3)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Taraf"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://radiotaraf.no-ip.biz:7100");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);        
                return 
1;
            }
            if(
listitem == 4)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio ZU"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://stream.radiozu.ro:8020/");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 5)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Kiss FM"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://80.86.106.136:80");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 6)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Hot Style"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://radiohot.ro/live.m3u");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 7)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Intens"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://live.radiointens.ro:8020");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 8)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Romania Hip-Hop"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://radioromanian.net/hiphop.pls");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 9)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Romania Manele"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://radioromanian.net/manele.pls");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 10)
            {
                
StopAudioStreamForPlayersInCar(vehicleid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Romania Popular"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://radioromanian.net/popular.pls");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 11)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio GMusic Rock"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://www.radiogmusic.com/rock.m3u");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 12)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Mafia"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://www.radiomafia.ro/listen.m3u");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
            if(
listitem == 13)
            {
                
StopAudioStreamForPlayer(playerid);
                
GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~g~Radio Greu de Difuzat"40005);
                
PlayAudioStreamForPlayer(vehicleid,"http://www.greudedifuzat.eu/greudedifuzat.m3u");
                
SetPlayerAttachedObject(playerid41942120.050000, -0.0149990.00000095.000000183.00000089.0000001110xffffffff);
                return 
1;
            }
        }
        return 
1;
    } 
CMD


PHP код:
CMD:music(playeridparams[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"Nu esti logat!");
    if(
IsPlayerConnected(playerid))
    {
        if(
PlayerInfo[playerid][pMp3] == 1)
        {
            
ShowPlayerDialog(playeridDIALOG_MP3DIALOG_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;

= REP
Reply
#2

Show onplayerkeystatechange code.
The problem isn't from the command.
Reply
#3

OnPlayerKeyStateChange have too many lines.
I search but not Found
Reply
#4

Anybody ?
Reply
#5

please guys help me
Reply
#6

Try searching it under OnPlayerExitVehicle then, if it's hard to find, why not press Control + F, search for
Код:
StopAudioStreamForPlayer(playerid);
and delete them if not needed? You might have put that line somewhere, which is not needed for you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)