ping autohaus problem

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
  • habe ein kleine problem. habe n paar autos und und für die autos ein spawnpunkt erstellt. nur es funktioniert nicht


    hier der code vom eig wichtigsten



    new Carlist[MAX_PLAYERS][ahCar];


    enum ahSpawn
    {
    Float:pos_x,
    Float:pos_y,
    Float:pos_z,
    Float:z_angle,
    };
    new Autospawns[3][ahSpawn] = {
    {739.7457,-1343.8668,13.2828,270.2592},
    {-1639.3599,1198.1665,6.9527,269.9673},
    {2127.1750,-1122.8827,25.5471,352.5272}
    };


    enum ahModell
    {
    Name[128],
    Autohaus,
    Modelid,
    Carid,
    Preis,
    Reparatur,
    Float:pos_x,
    Float:pos_y,
    Float:pos_z,
    Float:z_angle,
    };
    new Kaufliste[42][ahModell] = {
    {"Stallion",0,439,-1,750000,5000,783.0,-1335.0,13.2,121.1},
    {"Feltzer",0,533,-1,500000,3000,783.0,-1340.0,13.2,121.1},
    {"Windsor",0,555,-1,450000,3400,783.0,-1345.0,13.2,121.1},
    {"Blade",0,536,-1,350000,3000,783.0,-1350.0,13.2,121.1},
    {"Remington",0,534,-1,500000,3000,783.0,-1355.0,13.2,121.1},
    {"Savanna",0,567,-1,350000,3000,783.0,-1360.0,13.2,121.1},
    {"Slamvan",0,535,-1,500000,3000,783.0,-1365.0,13.2,121.1},
    {"Voodoo",0,412,-1,500000,3000,783.0,-1370.0,13.2,121.1},
    {"Huntley",0,579,-1,200000,1000,783.0,-1375.0,13.2,121.1},
    {"Buccaneer",0,518,-1,120000,1000,783.0,-1380.0,13.2,121.1},
    {"Clover",0,542,-1,35000,500,765.0,-1360.0,13.4,301.1},
    {"Elegant",0,507,-1,40000,650,765.0,-1365.0,13.4,301.1},
    {"Elegy",0,562,-1,1500000,10000,765.0,-1370.0,13.4,301.1},
    {"Esperanto",0,419,-1,65000,650,765.0,-1375.0,13.4,301.1},
    {"Fortune",0,526,-1,35000,500,765.0,-1380.0,13.4,301.1},
    {"Sultan",0,560,-1,1500000,10000,766.0,-1333.0,13.3,211.1},
    {"Sunrise",0,550,-1,300000,2000,761.0,-1333.0,13.3,211.1},
    {"Vincent",0,540,-1,280000,2000,756.0,-1333.0,13.3,211.1},
    {"Alpha",0,602,-1,230000,2000,751.0,-1333.0,13.3,211.1},
    {"Banshee",0,429,-1,1000000,5500,746.0,-1333.0,13.3,211.1},
    {"Blista Compact",1,496,-1,350000,2500,-1668.6447,1207.0372,7.0249,309.5959},
    {"Buffalo",1,402,-1,500000,3000,-1663.6709,1215.2883,7.0234,274.9868},
    {"Bullet",1,541,-1,7500000,17500,-1651.3892,1210.3469,7.0208,281.3321},
    {"Cheetah",1,415,-1,4000000,10000,-1677.3560,1207.8099,13.4461,208.2602},
    {"Club",1,589,-1,70000,750,-1665.7789,1222.4406,13.4485,279.6459},
    {"Euros",1,587,-1,650000,7000,-1660.7256,1217.6407,13.4444,283.1553},
    {"Infernus",1,411,-1,1500000,7000,-1653.2462,1210.7842,13.4460,266.7211},
    {"Jester",1,559,-1,1500000,10000,-1676.0128,1207.1641,20.9248,261.5029},
    {"Phoenix",1,603,-1,600000,4000,-1664.4386,1206.8241,20.9289,332.5978},
    {"Super GT",1,506,-1,12500000,20000,-1651.6372,1208.2538,20.9231,305.1015},
    {"Turismo",1,451,-1,13000000,20000,-1665.1248,1222.7113,20.9265,267.4103},
    {"Uranus",1,558,-1,850000,10000,-1661.1943,1217.9629,20.9268,286.1662},
    {"ZR-350",1,477,-1,6500000,7000,-1654.3116,1214.8097,20.9267,173.5712},
    {"Faggio",0,462,-1,10000,500,750.7272,-1358.3872,13.0996,273.7736},
    {"Picador",3,600,-1,30000,1000,2135.2852,-1128.3098,25.7922,57.8602},
    {"Tornado",3,576,-1,35000,1000,2134.8284,-1132.9552,25.3134,55.2167},
    {"Broadway",3,575,-1,40000,1000,2135.0984,-1137.7993,25.2954,47.9381},
    {"Yosemite",3,554,-1,60000,1500,2135.3203,-1143.2897,25.1780,50.3166},
    {"Tampa",3,549,-1,22000,500,2123.2705,-1142.8964,24.6161,335.2363},
    {"Sandler",3,543,-1,30000,1000,2118.9917,-1140.9380,25.1331,304.1991},
    {"Williard",3,529,-1,42000,1000,2118.8872,-1135.8207,24.8419,300.0933},
    {"Mesa",3,500,-1,46000,1000,2119.5527,-1130.6831,25.5176,302.7537}
    };
    von picador bis mesa hab ich neu eingefügt
    und hier das mit /buycar
    else if (strcmp("/buycar", cmd, true, 10) == 0)
    {
    if (Spectating[playerid][0]!=-1)
    {
    if (Carlist[playerid][Typ]==-1)
    {
    new preis = Kaufliste[Spectating[playerid][0]][Preis];
    if (preis <= GetPlayerMoney(playerid))
    {
    new autohaus=Kaufliste[Spectating[playerid][0]][Autohaus];
    GivePlayerMoney(playerid, - preis);
    Carlist[playerid][Typ]=Spectating[playerid][0]; Carlist[playerid][pos_x]=Autospawns[autohaus][pos_x]; Carlist[playerid][pos_y]=Autospawns[autohaus][pos_y];
    Carlist[playerid][pos_z]=Autospawns[autohaus][pos_z]; Carlist[playerid][z_angle]=Autospawns[autohaus][z_angle]; Carlist[playerid][Status]=1; Carlist[playerid][Lock]=0;
    Carlist[playerid][Carid]=CreateVehicle(Kaufliste[Spectating[playerid][0]][Modelid],Carlist[playerid][pos_x],Carlist[playerid][pos_y],Carlist[playerid][pos_z],Carlist[playerid][z_angle],-1,-1,-1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    TogglePlayerControllable(playerid,1);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    format(string,128,"Du hast dir erfolgreich f?r $%i ein/einen %s gekauft!",preis,Kaufliste[Carlist[playerid][Typ]][Name]);
    SendClientMessage(playerid, COLOR_RED, string);
    SendClientMessage(playerid, COLOR_GREEN, "Wenn du dein Fahrzeug zerst?rst, gib /fixcar ein.");
    SendClientMessage(playerid, COLOR_GREEN, "Mit /carlock kannst du dein Fahrzeug f?r andere Leute freigeben oder abschlie?en.");
    SendClientMessage(playerid, COLOR_GREEN, "Mehr Befehle kannst du unter /carhelp sehen.");
    SendClientMessage(playerid, COLOR_YELLOW, "Dein Auto steht am Ausgabepunkt bereit! Viel Spa? beim Fahren!");
    }
    else { format(string, 128, "Du hast nicht genug Geld f?r das Auto (ben?tigt: $%i)!", preis); SendClientMessage(playerid, COLOR_LIGHTRED, string); }
    }
    else { SendClientMessage(playerid, COLOR_GREY, "Du besitzt bereits ein Auto!"); }
    }
    else { SendClientMessage(playerid, COLOR_GREY, "Du besichtigst kein Auto!"); }
    return 1;
    }

  • {"Mesa",3,500,-1,46000,1000,2119.5527,-1130.6831,25.5176,302.7537}


    anstatt der 3 Nach dem Namen muss da eine 2 stehen bzw der spawnpunkt wo das auto spawnen soll. spawnpunkt open festgelegt


    also so
    {"Mesa",2,500,-1,46000,1000,2119.5527,-1130.6831,25.5176,302.7537}



    die 3 siehe hier
    new Autospawns[3][ahSpawn] = {
    {739.7457,-1343.8668,13.2828,270.2592}, //<<<<<<<<<<<<<<<0
    {-1639.3599,1198.1665,6.9527,269.9673}, //<<<<<<<<<<<<<<<1
    {2127.1750,-1122.8827,25.5471,352.5272} //<<<<<<<<<<<<<<<2
    };
    //usw