[PROBLEM]Autohaussystem

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
  • Moin Leute, bin grad an nem Autohaussystem, aber Ich kriegs nicht hin! ich hab eine Methode Gefunden die aber nicht Funktionieren wird!


    Hier:



    SadlerShit = AddStaticVehicle(605,2119.8826,-1124.5797,25.2141,246.2837,0,0); // Sadler Shit
    CreateDynamic3DTextLabel("Auto: Sadler\n Kosten: 2.000$\n Gehe in das Auto um es zu Kaufen", COLOR_AUTO, 2119.8826,-1124.5797,25.2141, 3.0);


    Walton = AddStaticVehicle(478,2119.1028,-1130.4701,25.3028,216.1857,0,0); // Walton
    CreateDynamic3DTextLabel("Auto: Walton\n Kosten: 8.000$\n Gehe in das Auto um es zu Kaufen", COLOR_AUTO, 2119.1028,-1130.4701,25.3028, 3.0);


    BobCat = AddStaticVehicle(422,2117.8430,-1134.3971,25.1830,201.3302,0,0); // BobCat
    CreateDynamic3DTextLabel("Auto: Bobcat\n Kosten: 7.000$\n Gehe in das Auto um es zu Kaufen", COLOR_AUTO, 2117.8430,-1134.3971,25.1830, 3.0);


    Bravura = AddStaticVehicle(401,2125.8169,-1151.6486,23.8440,314.4032,0,0); // Bravura
    CreateDynamic3DTextLabel("Auto: Bravura\n Kosten: 10.000$\n Gehe in das Auto um es zu Kaufen", COLOR_AUTO, 2125.8169,-1151.6486,23.8440, 3.0);


    Voodoo = AddStaticVehicle(412,2135.7263,-1150.9688,24.0026,34.7595,0,0); // Voodoo
    CreateDynamic3DTextLabel("Auto: Voodoo\n Kosten: 9.000$\n Gehe in das Auto um es zu Kaufen", COLOR_AUTO, 2135.7263,-1150.9688,24.0026, 3.0);


    Stallion = AddStaticVehicle(439,2120.9841,-1148.3010,24.2526,350.5370,0,0); // Stallion
    CreateDynamic3DTextLabel("Auto: Stallion\n Kosten: 7.499$\n Gehe in das Auto um es zu Kaufen", COLOR_AUTO,2120.9841,-1148.3010,24.2526, 3.0);


    Clover = AddStaticVehicle(542,2135.7290,-1136.1248,25.4053,34.4669,0,0); // Clover
    CreateDynamic3DTextLabel("Auto: Clover\n Kosten: 6.700$\n Gehe in das Auto um es zu Kaufen", COLOR_AUTO, 2135.7290,-1136.1248,25.4053, 3.0);


    GlendaleShit = AddStaticVehicle(604,2135.4023,-1142.1771,24.8459,77.9982,0,0); // Glendale Shit
    CreateDynamic3DTextLabel("Auto: Glendale\n Kosten: 1.800$\n Gehe in das Auto um es zu Kaufen", COLOR_AUTO, 2135.4023,-1142.1771,24.8459, 3.0);


    Das würde definitiv nicht Funktionieren:



    public IstInKaufVehikel(playerid)
    {
    if(GetPlayerVehicleID(playerid) == GlendaleShit || GetPlayerVehicleID(playerid) == Clover || GetPlayerVehicleID(playerid) == Stallion || GetPlayerVehicleID(playerid) == Voodoo || GetPlayerVehicleID(playerid) == BobCat || GetPlayerVehicleID(playerid) == Bravura || GetPlayerVehicleID(playerid) == SadlerShit || GetPlayerVehicleID(playerid) == Walton)
    {//Billigautohaus in Los Santos
    return 1;
    }
    return 0;
    }


    public KaufAuto(playerid)
    {
    if(IstInKaufVehikel(playerid) == 1)
    {
    new plName[MAX_PLAYER_NAME];
    new n = GetPlayerName(playerid,plName,sizeof(plName));
    new cid = GetPlayerVehicleID(playerid);
    new m = GetVehicleModel(cid);


    n = CarInfo[cid+1][Besitzer];
    m = CarInfo[cid+1][Model];
    CarInfo[cid+1][aX] = 2118.0366;
    CarInfo[cid+1][aY] = -1114.3884;
    CarInfo[cid+1][aZ] = 24.9394;
    CarInfo[cid+1][Angle] = 73.9630;
    CarInfo[cid+1][ccol1] = 0;
    CarInfo[cid+1][ccol2] = 0;
    CarInfo[cid+1][Gebraucht] = 0;
    CarInfo[cid+1][Zugelassen] = 0;
    SetVehicleNumberPlate(cid+1,"NEUWAGEN");

    GivePlayerMoney(playerid,TESTKOSTEN);

    new rand = random(12);
    switch(rand)
    {
    case 0: CreateVehicle(m,2118.0366,-1114.3884,24.9394,73.9630,0,0,900000); // Park
    case 1: CreateVehicle(m,2133.9192,-1118.7294,25.0388,74.6108,0,0,900000); // Park
    case 2: CreateVehicle(m,2148.8721,-1134.0610,25.2945,269.4051,0,0,900000); // Park
    case 3: CreateVehicle(m,2147.9573,-1138.0844,25.2326,268.7208,0,0,900000); // Park
    case 4: CreateVehicle(m,2161.5088,-1143.4700,24.5999,267.3801,0,0,900000); // Park
    case 5: CreateVehicle(m,2149.4468,-1142.9141,24.7324,267.4342,0,0,900000); // Park
    case 6: CreateVehicle(m,2161.1721,-1147.6986,24.1687,268.3524,0,0,900000); // Park
    case 7: CreateVehicle(m,2148.9656,-1147.3517,24.2452,268.3432,0,0,900000); // Park
    case 8: CreateVehicle(m,2160.0728,-1152.1971,23.7106,266.4353,0,0,900000); // Park
    case 9: CreateVehicle(m,2149.4902,-1152.6660,23.6786,267.2306,0,0,900000); // Park
    case 10: CreateVehicle(m,2160.7139,-1156.9493,23.5732,266.7503,0,0,900000); // Park
    case 11: CreateVehicle(m,2148.7026,-1156.9313,23.5748,269.9507,0,0,900000); // Park
    }
    }
    return 0;
    }



    /EDIT: Habt ihr ne Idee wie ichs Machen soll?


    //EDIT: Überschrift


    Danke im Vorraus


    MfG

    Einmal editiert, zuletzt von munkee ()