Beiträge von niklasbollmer

    Hier, habs dir gemacht:


    Du hast die ganzen Public's vergessen!


    #include <a_samp>


    //-----------------------------------------------------------------------------//
    #define DIALOG_RADIO 1


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/radio", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    ShowPlayerDialog(playerid, DIALOG_RADIO,DIALOG_STYLE_LIST, "Internet Radios", "Technobase.FM\nHousetime.FM\nILoveRadio.de\nByteFM\nTOP100 Station\nDubstep.FM\nRockland Radio!\nRauteMusic House\nRauteMusic Club\nRadio Aus", "Weiter", "Abbrechen");
    }
    return 1;
    }
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_RADIO)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Technobase.FM!");
    PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/dsl.pls");
    }
    if(listitem == 1)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Housetime.FM!");
    PlayAudioStreamForPlayer(playerid, "http://www.housetime.fm/wmplayer/");
    }
    if(listitem == 2)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "ILoveRadio!");
    PlayAudioStreamForPlayer(playerid, "http://www.iloveradio.de/listen.pls");
    }
    if(listitem == 3)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "ByteFM!");
    PlayAudioStreamForPlayer(playerid, "http://www.byte.fm/stream/bytefm.pls");
    }
    if(listitem == 4)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "TOP100 Station!");
    PlayAudioStreamForPlayer(playerid, "http://www.top100station.de/switch/top100station.pls");
    }
    if(listitem == 5)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Dubstep.FM!");
    PlayAudioStreamForPlayer(playerid, "http://dubstep.fm/listen.pls");
    }
    if(listitem == 6)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Rockland Radio!");
    PlayAudioStreamForPlayer(playerid, "http://freestream.nmdn.net/freestream/download/rocklandradio/frameset.html");
    }
    if(listitem == 7)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "RauteMusic House!");
    PlayAudioStreamForPlayer(playerid, "http://house-high.rautemusik.fm/rm.page//listen.pls");
    }
    if(listitem == 8)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "RauteMusic Club!");
    PlayAudioStreamForPlayer(playerid, "http://club-high.rautemusik.fm/rm.page//listen.asx");
    }
    if(listitem == 9)
    {
    SendClientMessage(playerid, 0x00ABFFFF, "Radio Aus!");
    StopAudioStreamForPlayer(playerid);
    }
    return 1;
    }
    }
    return 1;
    }
    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    StopAudioStreamForPlayer(playerid);
    return 1;
    }


    //-----------------------------------------------------------------------------//

    Versuch mal sowas:



    GameTextForPlayer(playerid, "Motor an!", 3000, 4);



    Beispiel:



    if(strcmp(cmdtext, "/motor", true) == 0)
    {
    if(GetPlayerVehicleSeat(playerid) == 0)
    {
    new car = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(car) == 509 || GetVehicleModel(car) == 481 || GetVehicleModel(car) == 510)
    {
    SendClientMessage(playerid, ROT, " ** Fehler: Dieses Fahrzeug hat keinen Motor **");
    }


    else if (Tank[car] < 1)
    {
    SendClientMessage(playerid, ROT, " ** Der Tank ist leer. Du musst erst das Fahrzeug volltanken, entweder mit einen Kanister oder mithilfe eines ADAC-Mitarbeiters. **");
    }


    else if (Motor[car] == false )
    {
    GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(car,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    Motor[car] = true;
    SendClientMessage(playerid, COLOR_LIGHTGREEN, " ** Du drehst den Zündschlüssel um.... **");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, " ** Der Motor springt an! **");
    GameTextForPlayer(playerid, "Motor an!", 3000, 4);


    }


    else
    {
    GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(car,VEHICLE_PARAMS_OFF,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    Motor[car] = false;
    SendClientMessage(playerid, COLOR_LIGHTBLUE, " ** Du hast den Motor ausgeschaltet. **");
    GameTextForPlayer(playerid, "Motor aus!", 3000, 4);
    }
    }
    return 1;
    }

    Gut.

    Mit OnPlayerStateChange(); funktioniert es auch nicht.

    So ist mein DutyCode:


    if(listitem==0)
    {
    new name[MAX_PLAYER_NAME], string[192+MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "{69FF00}Busfahrer %s ist nun im Dienst.", name);
    SendClientMessageToAll(COLOR_GRAY, string);
    dutybus[playerid] = 1;
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1269.4458,-883.8061,42.8828);
    }


    if(listitem==1)
    {
    new name[MAX_PLAYER_NAME], string[192+MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "{69FF00}Taxifahrer %s ist nun im Dienst.", name);
    SendClientMessageToAll(COLOR_GRAY, string);
    dutytaxi[playerid] = 1;
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1269.4458,-883.8061,42.8828);
    }

    Hi Com,


    bei meinem SelfMade Reallife Script, wird bei OnPlayerEnterVehicle überprüft, ob man TaxiDuty ist.


    Leider klappt das nicht. Bei jedem Vehicle kommt nun "Du bist nicht im Dienst".


    Mit jedem Vehicle meine ich, alle Vehicles auf dem Server.


    Hier die Abfrage:


    if(vehicleid == bsntaxi[0] || bsntaxi[1] || bsntaxi[2] || bsntaxi[3] || bsntaxi[4] || bsntaxi[5] || bsntaxi[6] || bsntaxi[7] || bsntaxi[8] || bsntaxi[9])
    {
    if(dutytaxi[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_GRAY, "Du bist nicht im Dienst!");
    TogglePlayerControllable(playerid, 0);
    TogglePlayerControllable(playerid, 1);
    }
    }
    else {
    //Hier kommt noch was hin
    }



    Muss man die VehicleID anders abfragen?




    Mfg