Beiträge von GooMan

    da liegt der Fehler ;)


    IsACop Car return't IMMER 1. d.H. du fragst oben ab ob er in einem fahrzeug mit der ID 1 ist.


    mach es so:


    if(strcmp(cmdtext, "/hack", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    if(IsACopCar(vehicleid))
    {
    new string[126];
    format(string, sizeof(string), "~r~Hackvorgang Gestartet Dauer 1 Minuten!");
    GameTextForPlayer(playerid, string, 5000, 3);
    TogglePlayerControllable(playerid, 0);
    SetTimer("HACK", 60000, 0);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du bist in keinem Polizei/FBI Fahrzeug!");
    }
    return 1;
    }


    EDIT:


    Code überarbeitet. Konnte nicht funktionieren

    Naja ganz okay.. Man hätte es auch noch kleiner machen können 6/10


    Und warum erstellst du hier noch ein 3D textlabel?


    if (IsPlayerInRangeOfPoint(playerid,7.0, 1740.2059,509.7868,28.4849))//Zoll -1- /1/==|Funktioniert|==
    {
    MoveObject(zoll1, 1742.7644042969, 518.56384277344, 25.184286117554, 4.0);
    SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 1)");
    GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-500$", 5000, 1);
    GivePlayerMoney(playerid, -500);
    Create3DTextLabel("Willkommen an der Zollstation~n~Tippe /zoll um den Zoll zu passieren",0xFFFFFFAA,1742.7644042969, 518.56384277344, 28.184286117554,15.0,0,0);
    SetTimer("GateCloseZoll1", 3000, 0);
    }


    RottenApple das hat er doch schon. Lesen Bildet.


    @R3DM4N


    OnGameModeInit unter die Cars ;)


    EDIT:


    Voller Code:



    public OnGameModeInit()
    {
    CopCar[0] = AddStaticVehicleEx(497,1565.3275,-1705.5417,28.5746,90.0488,103,1,-1); // LSPD heli
    CopCar[1] = AddStaticVehicleEx(497,1565.7350,-1644.4679,28.5778,90.2004,103,1,-1); // LSPD heli
    CopCar[2] = AddStaticVehicleEx(596,1535.7976,-1667.9401,13.1045,359.8312,1,103,-1); // LSPDCAR
    CopCar[3] = AddStaticVehicleEx(596,1535.9082,-1676.8617,13.1051,0.0376,1,103,-1); // LSPDCAR
    CopCar[4] = AddStaticVehicleEx(596,1601.0520,-1684.0634,5.6141,89.9282,1,103,-1); // LSPDcar
    CopCar[5] = AddStaticVehicleEx(596,1601.2188,-1688.0580,5.6123,89.0101,1,103,-1); // LSPDcar
    CopCar[6] = AddStaticVehicleEx(596,1601.0955,-1692.3639,5.6117,90.7693,1,103,-1); // LSPDcar
    CopCar[7] = AddStaticVehicleEx(596,1601.2831,-1696.3300,5.6110,91.1211,1,103,-1); // LSPDcar
    CopCar[8] = AddStaticVehicleEx(596,1601.4122,-1700.1632,5.6116,91.0425,1,103,-1); // LSPDcar
    CopCar[9] = AddStaticVehicleEx(599,1558.8849,-1711.6445,6.0800,1.4049,1,103,-1); // lspdcar
    CopCar[10] = AddStaticVehicleEx(596,1601.4215,-1704.2965,5.6122,91.7718,1,103,-1); // lspdcar
    CopCar[11] = AddStaticVehicleEx(599,1566.2745,-1711.5134,6.0843,359.5730,1,103,-1); // lspdcar
    CopCar[12] = AddStaticVehicleEx(523,1591.6399,-1712.0607,5.4585,359.7415,1,103,-1); // lspdbike
    CopCar[13] = AddStaticVehicleEx(523,1583.6204,-1712.1659,5.4621,1.6831,1,103,-1); // lspdbike
    CopCar[14] = AddStaticVehicleEx(523,1587.5050,-1711.9180,5.4602,1.5247,1,103,-1); // LSPDBike
    CopCar[15] = AddStaticVehicleEx(523,1578.7178,-1712.0957,5.4610,358.4359,1,103,-1); // lspd bike
    CopCar[16] = AddStaticVehicleEx(427,1529.0867,-1687.7498,6.0225,270.6141,1,103,-1); // lspd car
    CopCar[17] = AddStaticVehicleEx(427,1529.0754,-1683.8232,6.0224,271.2065,1,103,-1); // lspd car


    for(new i = 0; i < 18; i++)
    {
    new Text3D:3dtext = Create3DTextLabel("Text",0x00FF01,00.00,00.00,00.00,40.0,0);


    Attach3DTextLabelToVehicle( 3dtext, CopCar[i], 0.0, 0.0, 2.0);
    }
    return 1;
    }

    Er attachet es nur an einem Copcar ;).


    Zitat

    for(new i = 0; i < 18; i++)
    {
    new Text3D:3dtext = Create3DTextLabel("Text",0x00FF01,00.00,00.00,00.00,40.0,0);


    Attach3DTextLabelToVehicle( 3dtext, CopCar[i], 0.0, 0.0, 2.0); <-- Hier wird es nur an ein CopCar[] attachet
    }


    Das CopCar[i] beinhaltet die ID vom Copcar also die Fahrzeug ID dadurch wird die schleife alle 18 Cars durchgehen und alle 18 Cars attchen, und nur 18 stück ;)


    EDIT:


    Bisschen was hinzugefügt

    for(new i = 0; i < 18; i++)
    {
    new Text3D:3dtext = Create3DTextLabel("Text",0x00FF01,00.00,00.00,00.00,40.0,0);


    Attach3DTextLabelToVehicle( 3dtext, CopCar[i], 0.0, 0.0, 2.0);
    }


    So wäre es möglich

    Das Lol in "" packen^^


    Also:


    for(new i = 0; i < MAX_VEHICLES; i++)
    {
    SetVehicleNumerPlate(i,"LOL");
    SetVehicleToRespawn(i);
    }


    EDIT:
    Pwn quelltext

    lol. du musst auch den Include in den ordner Pawno / includes einfügen.


    Und das hier:

    #define STREAMER_TYPE_OBJECT (0)
    #define STREAMER_TYPE_PICKUP (1)
    #define STREAMER_TYPE_CP (2)
    #define STREAMER_TYPE_RACE_CP (3)
    #define STREAMER_TYPE_MAP_ICON (4)
    #define STREAMER_TYPE_3D_TEXT_LABEL (5)
    #define STREAMER_TYPE_AREA (6)


    enum
    {
    E_STREAMER_ATTACHED_PLAYER,
    E_STREAMER_ATTACHED_VEHICLE,
    E_STREAMER_COLOR,
    E_STREAMER_DISTANCE,
    E_STREAMER_DRAW_DISTANCE,
    E_STREAMER_EXTRA_ID,
    E_STREAMER_INTERIOR_ID,
    E_STREAMER_MAX_X,
    E_STREAMER_MAX_Y,
    E_STREAMER_MAX_Z,
    E_STREAMER_MIN_X,
    E_STREAMER_MIN_Y,
    E_STREAMER_MIN_Z,
    E_STREAMER_MODEL_ID,
    E_STREAMER_MOVE_SPEED,
    E_STREAMER_MOVE_X,
    E_STREAMER_MOVE_Y,
    E_STREAMER_MOVE_Z,
    E_STREAMER_NEXT_X,
    E_STREAMER_NEXT_Y,
    E_STREAMER_NEXT_Z,
    E_STREAMER_PLAYER_ID,
    E_STREAMER_R_X,
    E_STREAMER_R_Y,
    E_STREAMER_R_Z,
    E_STREAMER_SIZE,
    E_STREAMER_STYLE,
    E_STREAMER_TEST_LOS,
    E_STREAMER_TYPE,
    E_STREAMER_WORLD_ID,
    E_STREAMER_X,
    E_STREAMER_Y,
    E_STREAMER_Z
    }


    kannst du rausnehmen.