[Suche]Radio für alle im Auto

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
  • was weißt du den genau nicht ?


    wie man den sitzt abfragt oder was ?


    //edit


    fahrer abfragen:


    if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid)==0)



    die andern abfragen die im auto sind:



    for (new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    //was passieren soll
    }
    }

    Einmal editiert, zuletzt von Mr_x ()

  • Also guck mal das ist mein Radio Script


    if(dialogid == DIALOG_RADIO)
    {
    if(response)
    {
    if(listitem == 0)
    {
    GameTextForPlayer(playerid, "~r~Technobase.FM.", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/dsl.pls");
    }
    if(listitem == 1)
    {
    GameTextForPlayer(playerid, "~r~Hardbase.FM.", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://listen.hardbase.fm/dsl.pls");
    }
    if(listitem == 2)
    {
    GameTextForPlayer(playerid, "~r~Housetime.FM.", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://listen.housetime.fm/dsl.pls");
    }
    if(listitem == 3)
    {
    GameTextForPlayer(playerid, "~r~Trancebase.FM.", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://listen.trancebase.fm/dsl.pls");
    }
    if(listitem == 4)
    {
    GameTextForPlayer(playerid, "~r~Coretime.FM.", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://listen.coretime.fm/dsl.pls");
    }
    if(listitem == 5)
    {
    GameTextForPlayer(playerid, "~r~Clubtime.FM.", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://listen.Clubtime.fm/dsl.pls");
    }
    if(listitem == 6)
    {
    GameTextForPlayer(playerid, "~r~Plante Radio", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://streams.planetradio.de/planetradio/mp3/hqlivestream.m3u");
    }
    if(listitem == 7)
    {
    GameTextForPlayer(playerid, "~r~YouFM", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://metafiles.gl-systemhaus.de/hr/youfm_2.m3u");//YOU FM LIVE
    }
    if(listitem == 8)
    {
    GameTextForPlayer(playerid, "~r~YouFM Rock", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://metafiles.gl-systemhaus.de/hr/youfm_rock.m3u"); // YOU FM ROCK
    }
    if(listitem == 9)
    {
    GameTextForPlayer(playerid, "~r~YouFM Club", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://metafiles.gl-systemhaus.de/hr/youfm_club.m3u"); // YOU FM CLUB
    }
    if(listitem == 10)
    {
    GameTextForPlayer(playerid, "~r~YouFM Black", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://metafiles.gl-systemhaus.de/hr/youfm_black.m3u"); // YOU FM BLACK
    }
    if(listitem == 11)
    {
    GameTextForPlayer(playerid, "~r~T89.0RTL", 500,3);
    PlayAudioStreamForPlayer(playerid, "http://mp3.89.0rtl.de/listen.pls"); // 89.0 RTL
    }
    if(listitem == 12)
    {
    GameTextForPlayer(playerid, "~r~Radio Aus", 500,3);
    StopAudioStreamForPlayer(playerid);
    }
    return 1;
    }
    }


    Kannst du das machen?

  • hier aber ich weiß nicht genau ob es klapt


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_RADIO)
    {
    if(response)
    {
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
    if(listitem == 0)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~Technobase.FM.", 500,3);
    PlayAudioStreamForPlayer(i, "http://listen.technobase.fm/dsl.pls");
    }
    }
    if(listitem == 1)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~Hardbase.FM.", 500,3);
    PlayAudioStreamForPlayer(i, "http://listen.hardbase.fm/dsl.pls");
    }
    }
    if(listitem == 2)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~Housetime.FM.", 500,3);
    PlayAudioStreamForPlayer(i, "http://listen.housetime.fm/dsl.pls");
    }
    }
    if(listitem == 3)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~Trancebase.FM.", 500,3);
    PlayAudioStreamForPlayer(i, "http://listen.trancebase.fm/dsl.pls");
    }
    }
    if(listitem == 4)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~Coretime.FM.", 500,3);
    PlayAudioStreamForPlayer(i, "http://listen.coretime.fm/dsl.pls");
    }
    }
    if(listitem == 5)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~Clubtime.FM.", 500,3);
    PlayAudioStreamForPlayer(i, "http://listen.Clubtime.fm/dsl.pls");
    }
    }
    if(listitem == 6)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~Plante Radio", 500,3);
    PlayAudioStreamForPlayer(i, "http://streams.planetradio.de/planetradio/mp3/hqlivestream.m3u");
    }
    }
    if(listitem == 7)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~YouFM", 500,3);
    PlayAudioStreamForPlayer(i, "http://metafiles.gl-systemhaus.de/hr/youfm_2.m3u");//YOU FM LIVE
    }
    }
    if(listitem == 8)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~YouFM Rock", 500,3);
    PlayAudioStreamForPlayer(i, "http://metafiles.gl-systemhaus.de/hr/youfm_rock.m3u"); // YOU FM ROCK
    }
    }
    if(listitem == 9)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~YouFM Club", 500,3);
    PlayAudioStreamForPlayer(i, "http://metafiles.gl-systemhaus.de/hr/youfm_club.m3u"); // YOU FM CLUB
    }
    }
    if(listitem == 10)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~YouFM Black", 500,3);
    PlayAudioStreamForPlayer(i, "http://metafiles.gl-systemhaus.de/hr/youfm_black.m3u"); // YOU FM BLACK
    }
    }
    if(listitem == 11)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~T89.0RTL", 500,3);
    PlayAudioStreamForPlayer(i, "http://mp3.89.0rtl.de/listen.pls"); // 89.0 RTL
    }
    }
    if(listitem == 12)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i))
    {
    GameTextForPlayer(i, "~r~Radio Aus", 500,3);
    StopAudioStreamForPlayer(i);
    }
    }
    }
    return 1;
    }
    }
    return 1;
    }



    und bei dein Command ganz oben



    if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,farbe,"nachricht wenn er in kein auto ist");
    if(GetPlayerVehicleSeat(playerid)!=0)return SendClientMessage(playerid,farbe,"nachricht wenn er nciht der fahrer ist");



    wie gesagt ich weiß nicht ob es klapt aber ein versuch ist er wert :D



    Mfg


    Mr_x