Problem mit Radio Spielt nix ab

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • in den logs steht nix da steht nur meins was ich im erstem dialog geschriben habe das das klapt der 2 giebt kein ton von sich Mfg Lui




    das letzet macht der nicht die ersten beiden werden angezeigt



    case DIALOG_vehMUSIK:
    {
    new vehicleid = GetPlayerVehicleID(playerid),counter = 0;
    new string [900];
    if(response == 0)return 1;
    else
    {
    if(!IsPlayerInAnyVehicle(playerid))return SCM(playerid,GRAU,"[FEHLER]: Du befindest dich in keinem Fahrzeug!");
    for(new i=0;i<sizeof(Radio);i++)
    {
    if(strfind(string,Radio[i][urlcategory],true) == -1)
    {
    strcat(string,Radio[i][urlcategory]),strcat(string,"\n");
    counter++;
    print("dialog1");
    }
    }
    strdel(string,0,strlen(string));
    if(listitem >= counter)
    {
    ForEachPlayer(i)
    {
    if(IsPlayerConnected(i) && !IsPlayerNPC(i))
    {
    if(GetPVarInt(i,"Eingeloggt") == 1)
    {
    if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
    {
    if(IsPlayerInVehicle(i,vehicleid)) StopAudioStreamForPlayer(i);
    print("dialog1");
    }
    }
    }
    }
    return format(vFahrzeug[vehicleid][VehicleRadioStream],128,"NONE");
    }
    <Ab Hier ist vorbei dan wird der hier nix mehr angezeigt>
    for(new i=0;i<sizeof(Radio);i++)
    {
    if(!strcmp(Radio[i][urlcategory],inputtext,true))
    {
    strcat(string,Radio[i][urlname]),strcat(string,"\n");
    }
    }
    ShowPlayerDialog(playerid,DIALOG_vehMUSIK2,DIALOG_STYLE_LIST,VehicleDefinations[GetVehicleModel(vehicleid)-400],string,"Auswählen","Zurück");
    print("dialog1");
    }
    return 1;
    }


  • Was wird dir so im Server Log ausgegeben?
    case DIALOG_vehMUSIK:
    {
    printf("DIALOG_vehMUSIK");
    new vehicleid = GetPlayerVehicleID(playerid),counter = 0;
    new string [900];
    printf("response: %d", response);
    if(response == 0)return 1;
    else
    {
    printf("else");
    if(!IsPlayerInAnyVehicle(playerid))return SCM(playerid,GRAU,"[FEHLER]: Du befindest dich in keinem Fahrzeug!");
    for(new i=0;i<sizeof(Radio);i++)
    {
    if(strfind(string,Radio[i][urlcategory],true) == -1)
    {
    strcat(string,Radio[i][urlcategory]),strcat(string,"\n");
    counter++;
    }
    }
    printf("listitem: %d / counter: %d", listitem, counter);
    strdel(string,0,strlen(string));
    if(listitem >= counter)
    {
    ForEachPlayer(i)
    {
    if(IsPlayerConnected(i) && !IsPlayerNPC(i))
    {
    if(GetPVarInt(i,"Eingeloggt") == 1)
    {
    if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
    {
    if(IsPlayerInVehicle(i,vehicleid)) StopAudioStreamForPlayer(i), printf("Stoppe Stream für %d", i);
    }
    }
    }
    }
    format(vFahrzeug[vehicleid][VehicleRadioStream],128,"NONE");
    }
    printf("Schleife.");
    for(new i=0;i<sizeof(Radio);i++)
    {
    if(!strcmp(Radio[i][urlcategory],inputtext,true))
    {
    strcat(string,Radio[i][urlname]),strcat(string,"\n");
    }
    }
    printf("ShowPlayerDialog");
    ShowPlayerDialog(playerid,DIALOG_vehMUSIK2,DIALOG_STYLE_LIST,VehicleDefinations[GetVehicleModel(vehicleid)-400],string,"Auswählen","Zurück");
    }
    return 1;
    }

  • hier der log


    [19:20:25] DIALOG_vehMUSIK
    [19:20:25] response: 1
    [19:20:25] else
    [19:20:25] listitem: 0 / counter: 1
    [19:20:25] Schleife.
    [19:20:25] ShowPlayerDialog
    [19:20:25] DIALOG_vehMUSIK2
    [19:20:25] response: 1
    [19:20:25] else
    [19:20:25] i: 0 eingeloggt.
    [19:20:25] Welt ok.
    [19:20:25] '{FF3300}I Love Radio' EQ 'I Love Radio'
    [19:20:25] '{FF3300}I Love Dance' EQ 'I Love Radio'
    [19:20:25] '{FF3300}I Love The Battle' EQ 'I Love Radio'
    [19:20:25] '{0000FF}#RM.Jam' EQ 'I Love Radio'
    [19:20:25] '{0000FF}Blackbeats.FM' EQ 'I Love Radio'
    [19:20:25] '{0000FF}TrueHipHop.FM' EQ 'I Love Radio'
    [19:20:25] '{CCFF66}Antenne Bayern' EQ 'I Love Radio'
    [19:20:25] '{CCFF66}Antenne Chillout' EQ 'I Love Radio'
    [19:20:25] '{CCFF66}Clubtime.FM' EQ 'I Love Radio'
    [19:20:25] '{CCFF66}NDR Chillout' EQ 'I Love Radio'
    [19:20:25] '{00E5CC}#RM.BigCityBeat' EQ 'I Love Radio'
    [19:20:25] '{00E5CC}#RM.House' EQ 'I Love Radio'
    [19:20:25] '{00E5CC}Housetime.FM' EQ 'I Love Radio'
    [19:20:25] '{9F00FF}Technobase.FM' EQ 'I Love Radio'
    [19:20:25] '{9F00FF}AfterHours DJS' EQ 'I Love Radio'
    [19:20:25] '{9F00FF}#RM.Harder' EQ 'I Love Radio'

  • hier noch mall die dialog code der res ist geblieben

    [list=1][*]new Radio[][RadioInfo] =
    [*] {
    [*] //urlname[24],url[64]
    [*] {"I Love","{FF3300}I Love Radio","http://www.iloveradio.de/iloveradio.m3u"},
    [*] {"I Love","{FF3300}I Love Dance","http://www.iloveradio.de/ilove2dance.m3u"},
    [*] {"I Love","{FF3300}I Love The Battle","http://www.iloveradio.de/ilovethebattle.m3u"},
    [*] {"I Love","{FF3300}I Love Mashup","http://www.iloveradio.de/ilovemashup.m3u"},
    [*] {"I Love","{FF3300}I Love Bravo Charts","http://www.iloveradio.de/ilovebravocharts.m3u"},
    [*] {"I Love","{FF3300}I Love Bravo Tubestars","http://www.iloveradio.de/ilovebravotubestars.m3u"},
    [*] {"I Love","{FF3300}I Love Bravo Love","http://www.iloveradio.de/ilovebravolove.m3u"},
    [*] {"I Love","{FF3300}I Love Bravo Party","http://www.iloveradio.de/ilovebravoparty.m3u"},
    [*] {"I Love","{FF3300}I Love Bigfm Urban Club Beats","http://www.iloveradio.de/ilovebigfmurbanclubbeats.m3u"},
    [*] {"I Love","{FF3300}I Love Bigfm Groove Night","http://www.iloveradio.de/ilovebigfmgroovenight.m3u"},
    [*] {"I Love","{FF3300}I Love Bigfm Nitrox","http://www.iloveradio.de/ilovebigfmgroovenight.m3u"},
    [*] {"I Love","{FF3300}I Love About:Berlin","http://www.iloveradio.de/iloveaboutberlin.m3u"},
    [*] {"I Love","{FF3300}I Love X-Mas","http://www.iloveradio.de/ilovexmas.m3u"},
    [*] {"1Live","1Live","http://www.wdr.de/wdrlive/media/einslive.m3u"},
    [*] {"1Live","1Live diggi","http://www.wdr.de/wdrlive/media/einslivedigi.m3u"},
    [*] {"WDR","WDR 2","http://www.wdr.de/wdrlive/media/wdr2.m3u"},
    [*] {"WDR","WDR 3","http://www.wdr.de/wdrlive/media/wdr3_hq.m3u"},
    [*] {"WDR","WDR 4","http://www.wdr.de/wdrlive/media/wdr4.m3u"},
    [*] {"WDR","WDR 5","http://www.wdr.de/wdrlive/media/wdr5.m3u"},
    [*] {"NRW","Dortmund Radio 92.2","http://lokalradiostream.de:8004/.m3u"},
    [*] {"Hip Hop/Rap","{0000FF}#RM.Jam","http://jam-high.rautemusik.fm/rm.page//listen.pls"},
    [*] {"Hip Hop/Rap","{0000FF}Blackbeats.FM","http://blackbeats.fm/listen.m3u"},
    [*] {"Hip Hop/Rap","{0000FF}TrueHipHop.FM","http://truehiphophigh.dyndns.org:9020/listen.pls"},
    [*] {"Club","{CCFF66}Antenne Bayern","http://www.antenne.de/webradio/antenne.m3u"},
    [*] {"Club","{CCFF66}Antenne Chillout","http://www.antenne.de/webradio/channels/chillout.m3u"},
    [*] {"Club","{CCFF66}Clubtime.FM","http://listen.Clubtime.fm/dsl.pls"},
    [*] {"Club","{CCFF66}NDR Chillout","http://www.ndr.de/resources/metadaten/audio/m3u/ndrloop25.m3u"},
    [*] {"House/RnB","{00E5CC}#RM.BigCityBeat","http://bcb-high.rautemusik.fm/listen.pls"},
    [*] {"House/RnB","{00E5CC}#RM.House","http://house-high.rautemusik.fm/rm.page//listen.pls"},
    [*] {"House/RnB","{00E5CC}Housetime.FM","http://listen.housetime.fm/dsl.pls"},
    [*] {"Techno","{9F00FF}Technobase.FM","http://listen.technobase.fm/dsl.pls"},
    [*] {"Techno","{9F00FF}AfterHours DJS","http://ahdjs.net/listen.pls"},
    [*] {"Techno","{9F00FF}#RM.Harder","http://harder-high.rautemusik.fm/listen.pls"}
    [*] };
    [*]
    [*] case DIALOG_vehMUSIK:
    [*] {
    [*] new vehicleid = GetPlayerVehicleID(playerid),counter = 0;
    [*] new string [900];
    [*] if(response == 0)return 1;
    [*] else
    [*] {
    [*] if(!IsPlayerInAnyVehicle(playerid))return SCM(playerid,GRAU,"[FEHLER]: Du befindest dich in keinem Fahrzeug!");
    [*] for(new i=0;i<sizeof(Radio);i++)
    [*] {
    [*] if(strfind(string,Radio[i][urlcategory],true) == -1)
    [*] {
    [*] strcat(string,Radio[i][urlcategory]),strcat(string,"\n");
    [*] counter++;
    [*] }
    [*] }
    [*] strdel(string,0,strlen(string));
    [*] if(listitem >= counter)
    [*] {
    [*] ForEachPlayer(i)
    [*] {
    [*] if(IsPlayerConnected(i) && !IsPlayerNPC(i))
    [*] {
    [*] if(GetPVarInt(i,"Eingeloggt") == 1)
    [*] {
    [*] if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
    [*] {
    [*] if(IsPlayerInVehicle(i,vehicleid)) StopAudioStreamForPlayer(i);
    [*] }
    [*] }
    [*] }
    [*] }
    [*] return format(VehicleRadioStream[vehicleid],128,"NONE");
    [*] }
    [*] for(new i=0;i<sizeof(Radio);i++)
    [*] {
    [*] if(!strcmp(Radio[i][urlcategory],inputtext,true))
    [*] {
    [*] strcat(string,Radio[i][urlname]),strcat(string,"\n");
    [*] }
    [*] }
    [*] ShowPlayerDialog(playerid,DIALOG_vehMUSIK2,DIALOG_STYLE_LIST,VehicleDefinations[GetVehicleModel(vehicleid)-400],string,"Auswählen","Zurück");
    [*] }
    [*] return 1;
    [*] }
    [*]
    [*]
    [*] case DIALOG_vehMUSIK2:
    [*] {
    [*] new vehicleid = GetPlayerVehicleID(playerid);
    [*] new Float:x,Float:y,Float:z;
    [*] new string [900];
    [*] if(response == 0)
    [*] {
    [*] for(new i=0;i<sizeof(Radio);i++)
    [*] {
    [*] if(strfind(string,Radio[i][urlcategory],true) == -1)
    [*] {
    [*] strcat(string,Radio[i][urlcategory]),strcat(string,"\n");
    [*] }
    [*] }
    [*] strcat(string,"Radio Aus");
    [*] return ShowPlayerDialog(playerid,DIALOG_vehMUSIK,DIALOG_STYLE_LIST,VehicleDefinations[GetVehicleModel(vehicleid)-400],string,"Auswählen","Abbrechen");
    [*] }
    [*] else
    [*] {
    [*] if(!IsPlayerInAnyVehicle(playerid))return SCM(playerid,GRAU,"[FEHLER]: Du befindest dich in keinem Fahrzeug!");
    [*] ForEachPlayer(i)
    [*] {
    [*] if(IsPlayerConnected(i) && !IsPlayerNPC(i))
    [*] {
    [*] if(GetPVarInt(i,"Eingeloggt") == 1)
    [*] {
    [*] if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
    [*] {
    [*] if(IsPlayerInVehicle(i,vehicleid))
    [*] {
    [*] for(new i2=0;i2<sizeof(Radio);i2++)
    [*] {
    [*] if(!strcmp(Radio[i2][urlname][8],inputtext,true))
    [*] {
    [*] StopAudioStreamForPlayer(playerid);
    [*] PlayAudioStreamForPlayer(i,Radio[i2][url],x,y,z,5.0,0);
    [*] format(VehicleRadioStream[vehicleid],128,Radio[i2][url]);
    [*] }
    [*] }
    [*] }
    [*] }
    [*] }
    [*] }
    [*] }
    [*] }
    [*] return 1;
    [*] }
    [/list]



    wenn ich eine sender auswehle macht der alle sender auf hoffe einer weiß was ich machen kann
    Hoffe jemand kann helfen MfG lui

  • Das liegt daran, dass du manche Sender ohne Farbcode drin hast.
    Ändere die Schleife im zweiten Dialog zu:
    for(new i2=0;i2<sizeof(Radio);i2++)
    {
    if((Radio[i2][urlname][0] == '{' && Radio[i2][urlname][7] == '}' && !strcmp(Radio[i2][urlname][8],inputtext,true)) || !strcmp(Radio[i2][urlname],inputtext,true))
    {
    StopAudioStreamForPlayer(playerid);
    PlayAudioStreamForPlayer(i,Radio[i2][url],x,y,z,5.0,0);
    format(VehicleRadioStream[vehicleid],128,Radio[i2][url]);
    }
    }


    Dann geht es sowohl mit Code, als auch ohne.