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
  • hey leute habe kleines problem mit dem autoradio der spielt keine musik ab hoffe ihr könnt mir da helfen
    das Problem ist noch da ich bekomme es nicht zum laufen der dialog wird angezeigt erspielt nix ab weiß nicht warum hoffe ihr könnt mir helfen



    enum RadioInfo
    {
    urlcategory[64],
    urlname[64],
    url[128]
    }



    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","{0000FF}#RM.Jam","http://jam-high.rautemusik.fm/rm.page//listen.pls"},
    {"I Love","{0000FF}Blackbeats.FM","http://blackbeats.fm/listen.m3u"},
    {"I Love","{0000FF}TrueHipHop.FM","http://truehiphophigh.dyndns.org:9020/listen.pls"},
    {"I Love","{CCFF66}Antenne Bayern","http://www.antenne.de/webradio/antenne.m3u"},
    {"I Love","{CCFF66}Antenne Chillout","http://www.antenne.de/webradio/channels/chillout.m3u"},
    {"I Love","{CCFF66}Clubtime.FM","http://listen.Clubtime.fm/dsl.pls"},
    {"I Love","{CCFF66}NDR Chillout","http://www.ndr.de/resources/metadaten/audio/m3u/ndrloop25.m3u"},
    {"I Love","{00E5CC}#RM.BigCityBeat","http://bcb-high.rautemusik.fm/listen.pls"},
    {"I Love","{00E5CC}#RM.House","http://house-high.rautemusik.fm/rm.page//listen.pls"},
    {"I Love","{00E5CC}Housetime.FM","http://listen.housetime.fm/dsl.pls"},
    {"I Love","{9F00FF}Technobase.FM","http://listen.technobase.fm/dsl.pls"},
    {"I Love","{9F00FF}AfterHours DJS","http://ahdjs.net/listen.pls"},
    {"I Love","{9F00FF}#RM.Harder","http://harder-high.rautemusik.fm/listen.pls"}
    };




    if(strcmp(cmd,"Radio",true) == 0)
    {
    if(GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 510)return SCM(playerid,GRAU,"Fahrzeug hat keinen Radio.");
    new mainstring[1000];
    for(new i=0;i<sizeof(Radio);i++)
    {
    if(strfind(mainstring,Radio[i][urlcategory],true) == -1)
    {
    strcat(mainstring,Radio[i][urlcategory]),strcat(mainstring,"\n");
    }
    }
    strcat(mainstring,"Radio Aus");
    return ShowPlayerDialog(playerid,DIALOG_vehMUSIK,DIALOG_STYLE_LIST,VehicleDefinations[GetVehicleModel(GetPlayerVehicleID(playerid))-400],mainstring,"Auswählen","Abbrechen");
    }




    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 sitzt 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 sitzt 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],inputtext,true))
    {
    StopAudioStreamForPlayer(playerid);
    PlayAudioStreamForPlayer(i,Radio[i2][url],x,y,z,5.0,0);
    format(VehicleRadioStream[vehicleid],128,Radio[i2][url]);
    }
    }
    }
    }
    }
    }
    }
    }
    return 1;
    }





    hoffe ihr könnt mir helfen MfG luiluiboy014

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Was wird dir so im Server Log ausgegeben?
    case DIALOG_vehMUSIK2:
    {
    printf("DIALOG_vehMUSIK2");
    new vehicleid = GetPlayerVehicleID(playerid);
    new Float:x,Float:y,Float:z;
    new string[900];
    printf("response: %d", response);
    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
    {
    printf("else");
    if(!IsPlayerInAnyVehicle(playerid))return SCM(playerid,GRAU,"[FEHLER]: Du sitzt in keinem Fahrzeug.");
    ForEachPlayer(i)
    {
    if(IsPlayerConnected(i) && !IsPlayerNPC(i))
    {
    if(GetPVarInt(i,"Eingeloggt") == 1)
    {
    printf("i: %d eingeloggt.", i);
    if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
    {
    printf("Welt ok.");
    if(IsPlayerInVehicle(i,vehicleid))
    {
    for(new i2=0;i2<sizeof(Radio);i2++)
    {
    printf("'%s' EQ '%s'", Radio[i2][urlname], inputtext);
    if(!strcmp(Radio[i2][urlname],inputtext,true))
    {
    printf("Starte Stream");
    StopAudioStreamForPlayer(playerid);
    PlayAudioStreamForPlayer(i,Radio[i2][url],x,y,z,5.0,0);
    format(VehicleRadioStream[vehicleid],128,Radio[i2][url]);
    }
    }
    }
    }
    }
    }
    }
    }
    return 1;
    }