Wie kann ich hier das Autohaus einbauen, bzw. die Pickups dazu machen!?!

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
  • Hey ich habe noch dieses alte Script hier auf dem Desktop herumliegen...


    Jedoch möchte ich da das Autohaus rein bekommen!
    Hat jemand von euch eine Idee?


    Ich habe mal geguckt und ansich ist das Autohaus da drinne, die Pickups fehlen dazu nur und da brauche ich Hilfe!


    Wie ich die rein machen kann, so dass sich das Autohaus auch quasi öffnet!!!


    Da ich kein Pastebin Pro Account habe und das Script sonst zu groß wäre, gebe ich euch mal Infos über das was ich alles habe (zum Thema Autohaus)


    Oben definiert
    #define MaxVeh 4 // Anzahl Möglicher Fahrzeuge pro Person! Achtung nicht zu hoch setzten! Das verbraucht Speicher und kann über das Carlimit hinausschiessen!
    #define AUTOHAUSER 5 // Anzahl der Autohäuser


    Ebenfalls oben
    new Dtc_PlayerHaveCar[MAX_PLAYERS][MaxVeh];
    new Dtc_PlayerKey[MAX_PLAYERS];
    new RadZahl[AUTOHAUSER];
    new Dtc_Carlock[700];
    new Text: CarKauf[MAX_PLAYERS];
    new dtc_AutohausCar[MAX_PLAYERS],dtc_AutohausCat[MAX_PLAYERS],dtc_AutohausSCar[MAX_PLAYERS];
    new productiontimer;


    Außerdem


    enum dtcCarModell
    {
    dtc_Autohaus,
    dtc_CarModel,
    dtc_CarPreis
    };
    new dtcKaufliste[][dtcCarModell] = { //CARSYS
    //0 = 2 Räder
    {0,462,2000}, //Faggio
    {0,581,70000}, //BF-400
    {0,521,80000}, //FCR-900
    {0,463,60000}, //Freeway
    {0,461,90000}, //PCJ-600
    {0,468,20000}, //Sanchez
    {0,586,20000}, //Wayfarer
    {0,471,30000}, //Quad
    {0,522,120000}, //NRG


    // 1 = Bugy
    {1,470,1}, // Buggy ^^
    // 2 = Vagos Base Autohaus
    {2,467,6000}, //Oceanic
    {2,536,10000}, //Blade
    {2,534,7000}, //Remigton
    {2,567,12000}, //Savanna
    {2,535,20000}, //Slamvan
    {2,412,7500}, //Voodo
    {2,426,30000}, //Premier
    {2,421,40000}, // Washington
    {2,518,10000}, //Buccanee
    {2,542,5000}, //Clover
    {2,496,7500}, //Blistac
    {2,587,12000}, //Euros
    {2,439,15000}, //Stallion
    {2,550,12000}, //Sunrise
    {2,540,10000}, //Vincent
    {2,404,9500}, //Peren
    {2,413,10000}, //Pony
    {2,458,12500}, //Solair
    {2,479,12500}, //Regina
    {2,440,9500}, //Rumpo
    {2,423,10000}, //Eiswagen (Mrwhoop)
    {2,483,16000}, //Camper
    {2,500,12500}, //Mesa
    {2,508,80000}, //Journey
    {2,554,25000}, //Yosemite
    {2,561,30000}, //Startum
    {2,489,22000}, //Rancher
    {2,543,15000}, //Sadler
    {2,442,20000}, //Leichenwagen
    {2,527,6000}, //Cadrona
    {2,531,6000}, //Farmtraktor
    // An Oamt Base
    {3,533,70000}, //Feltzer
    {3,579,90000}, //Huntley
    {3,507,96999}, //Elegant
    {3,419,120000}, //Esperant
    {3,526,94000}, //Fortune
    {3,602,109995}, //Alpha
    {3,400,100000}, //Landstal
    {3,545,100000}, //Hustler
    {3,405,120000}, //Sentinel
    {3,445,125000}, //Admiral
    {3,475,70000}, //Sabre
    {3,409,1200000}, //Stretch
    {3,562,180000}, //Elegy
    {3,560,200000}, //Sultan
    {3,429,140000}, //Banshee
    {3,402,150000}, //Buffalo
    {3,541,280000}, //Bullet
    {3,415,248000}, //Cheetah
    {3,589,176000}, //Club
    {3,411,200000}, //Infernus
    {3,559,145000}, //Jester
    {3,603,155000}, //Phönix
    {3,506,270000}, //Supergt
    {3,451,225000}, //Turismo
    {3,558,180000}, //Uranus
    {3,480,140000}, //Comet
    {3,477,95000}, //Zr350
    {3,565,120000}, //Flash
    //2 = LS AIRPORT (Flugzeuge Helikopter)
    {4,487,6000000}, //Maverick
    {4,469,3000000}, //Spearrow
    {4,511,2000000}, //Beagle
    {4,593,1500000}, //Dodo
    {4,513,1500000}, //StuntFlugzeug
    {4,519,12000000} //Shamal
    };


    new Float:DtcParkPlatz[AUTOHAUSER][MAXPARKPLATZE][4] = {
    {//2Räder LS
    {2471.7231, -1558.3952, 23.5809, 0.0},
    {2474.7231, -1558.3952, 23.5751, 0.0},
    {2477.7231, -1558.3952, 23.5771, 0.0},
    {2480.7231, -1558.3952, 23.5921, 0.0}
    },
    {//bug
    {-5000.0, -50000.0, -50000.0, 5000000.500000},
    {-5000.0, -50000.0, -50000.0, 500000.0},
    {-5000.0, -50000.0, -50000.0, 500000.0},
    {-5000.0, -50000.0, -50000.0, 500000.0}
    },
    {//LS CarSeller
    {2148.0617, -1138.3233, 25.1975, 270.0},
    {2148.5222, -1143.1345, 24.6887, 270.0},
    {2147.8491, -1148.3714, 24.1134, 270.0},
    {2147.5104, -1152.7818, 23.6500, 270.0}
    },
    {//LS Studio
    {743.0629, -1334.0764, 13.2483, 180.0},
    {748.0629, -1334.0764, 13.2708, 180.0},
    {753.0629, -1334.0764, 13.2483, 180.0},
    {758.0629, -1334.0764, 13.2708, 180.0}
    },
    {//LS AIRPORT
    {1725.5981,-2414.4631,13.5547,91.2938},
    {1648.4031,-2413.2231,13.5547,91.2938},
    {1566.8810,-2416.3340,13.5547,89.3299},
    {1899.1111,-2374.5435,13.8934,270.3974}
    }
    };


    new Float:DtcSonstiges[AUTOHAUSER][5][6] = {
    {//2Räder LS
    {2471.0097, -1542.7354, 24.1628, 0.0}, // Info Zeichen etc.
    {2475.3952, -1537.1600, 28.6523, 340.2388}, // LiveView Car
    {2472.8505, -1533.2855, 29.0964, 0.0}, // LiveView Cam
    {2468.4548, -1534.1237, 29.1007, 0.0}, // LiveView Player
    {2470.8825, -1544.0834, 24.0406, 178.5745} // LiveView Player Exit
    },
    {//Bug
    {5000000.0, 0.0, -40.0, 0.0},
    {5000000.0, 0.0, -40.0, 0.0},
    {5000000.0, 0.0, -40.0, 0.0},
    {5000000.0, 0.0, -40.0, 0.0},
    {5000000.0, 0.0, -40.0, 0.0}
    },
    {//LS CarSeller
    {2131.7124, -1151.0965, 24.0838, 0.0}, // Info Zeichen etc.
    {2131.7192, -1163.0882, 27.8755, 301.3163}, // LiveView Car
    {2133.0817, -1156.3632, 28.1484, 0.0}, // LiveView Cam
    {2133.0031, -1154.4589, 28.1484, 0.0}, // LiveView Player
    {2131.7634, -1148.4149, 24.3788, 359.2809} // LiveView Player Exit
    },
    {//LS Studio
    {750.7259, -1356.9744, 13.5000, 0.0}, // Info Zeichen etc.
    {740.5779, -1365.2796, 25.4192, 225.3830}, // LiveView Car
    {741.2583, -1370.9835, 25.6922, 0.0}, // LiveView Cam
    {741.7747, -1376.3156, 25.6922, 0.0}, // LiveView Player
    {753.6887, -1338.2799, 13.5320, 14.7941} // LiveView Player Exit
    },
    {//LS AIRPORT
    {1774.7336,-2433.5491,13.5547,252.3329}, // Info Zeichen etc.
    {1765.1451,-2286.7554,26.7960,313.5673}, // LiveView Car
    {1765.4340,-2271.0989,31.0900,181.3627}, // LiveView Cam
    {1765.4340,-2271.0989,31.0900,181.3627}, // LiveView Player
    {1778.3945,-2432.7996,13.5547,171.6871} // LiveView Player Exit
    }
    };



    enum dtc_PlayerCar
    {
    CarId,
    CarOwner[MAX_PLAYER_NAME],
    CarModel,
    Float:CarPos_x,
    Float:CarPos_y,
    Float:CarPos_z,
    Float:CarRotate,
    CarNitro,
    CarHyd,
    CarWheel,
    CarAusp,
    CarSideL,
    CarSideR,
    CarFB,
    CarRB,
    CarSpoiler,
    CarRoof,
    CarHood,
    CarVents,
    CarLamps,
    CarPJ,
    CarC1,
    CarC2,
    CarPreis,
    CarArrest,
    Plate[15],
    };


    new PlayerCar[MAX_PLAYERS][MaxVeh][dtc_PlayerCar];


    new CarName[][] =
    {
    "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
    "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
    "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
    "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
    "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
    "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
    "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
    "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
    "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
    "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
    "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
    "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
    "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
    "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
    "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
    "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
    "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
    "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
    "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
    "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
    "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
    "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
    "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
    "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratum",
    "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
    "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
    "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
    "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
    "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
    "Police Car", "Police Car", "Police Ranger", "Picador", "#", "Alpha",
    "Phoenix", "2. Gebrauchtwagen", "1. Gebrauchtwagen", "Luggage", "Luggage", "Stairs", "Boxville",
    "Tiller", "Utility Trailer"
    };



    Nun so etwas


    dtc_AutohausCar[playerid] = 0;
    dtc_AutohausCat[playerid] = 2000;
    dtc_AutohausSCar[playerid] = 0;
    Dtc_PlayerKey[playerid] = 0;
    for(new i = 0; i < MaxVeh; i++)
    {
    Dtc_PlayerHaveCar[playerid][i] = 0;



    }


    for(new i = 0; i < 700; i++)
    {
    if(Dtc_Carlock[i])
    {
    SetVehicleParamsForPlayer(i,playerid,0,1);
    }
    }


    Nun so etwas


    if(dtc_AutohausCat[playerid] != 2000)
    {
    new autohaus = dtc_AutohausCat[playerid];
    new AhCars;
    for(new ah = 0; ah < sizeof(dtcKaufliste);ah++)
    {
    if(dtcKaufliste[ah][dtc_Autohaus] == autohaus)
    {
    AhCars ++;
    }
    }
    if(newkeys == KEY_ANALOG_RIGHT || newkeys == KEY_LOOK_RIGHT || newkeys == KEY_FIRE) //right (4 Numpad/e)
    {
    new carid = dtc_AutohausCar[playerid] +1;
    if(carid >= AhCars)
    {
    carid = 0;
    }
    new car,preis,counter;
    for(new ah = 0; ah < sizeof(dtcKaufliste);ah++)
    {
    if(dtcKaufliste[ah][dtc_Autohaus] == autohaus)
    {
    if( counter == carid)
    {
    car = dtcKaufliste[ah][dtc_CarModel];
    preis = dtcKaufliste[ah][dtc_CarPreis];
    }
    counter ++;
    }
    }
    new c1 = random(120);
    new c2 = random(120);
    DestroyVehicle(dtc_AutohausSCar[playerid]);
    dtc_AutohausSCar[playerid] = CreateVehicle(car, DtcSonstiges[autohaus][1][0],DtcSonstiges[autohaus][1][1],DtcSonstiges[autohaus][1][2],DtcSonstiges[autohaus][1][3],c1,c2,-1);
    SetVehicleVirtualWorld(dtc_AutohausSCar[playerid],55+playerid);
    new string[246];
    TextDrawHideForPlayer(playerid,CarKauf[playerid]);
    TextDrawDestroy(CarKauf[playerid]);
    format(string,sizeof(string),"~r~---------- AUTOHAUS ----------~n~~g~Fahrzeug: ~w~%s~n~~g~Preis: ~w~$%d~n~~b~Auswählen:~n~~w~ <Num 4<~b~&~w~>Num 6> ~n~~b~Kaufen:~w~ Enter ~n~~b~Abbrechen:~w~ Tab",CarName[car-400],preis);
    CarKauf[playerid] = TextDrawCreate(200,310,string);
    TextDrawAlignment(CarKauf[playerid],1);
    TextDrawUseBox(CarKauf[playerid],1);
    TextDrawBoxColor(CarKauf[playerid],0x000000FF);
    TextDrawBackgroundColor(CarKauf[playerid],COLOR_BLACK);
    TextDrawSetOutline(CarKauf[playerid],1);
    TextDrawFont(CarKauf[playerid], 2);
    //TextDrawSetProportional(CarKauf[playerid], 2);
    TextDrawTextSize(CarKauf[playerid],450,410);
    TextDrawShowForPlayer(playerid,CarKauf[playerid]);
    dtc_AutohausCar[playerid] = carid;
    }
    if(newkeys == KEY_ANALOG_LEFT || newkeys == KEY_LOOK_LEFT || newkeys == KEY_JUMP) //left (6 Numpad/q)
    {
    new carid = dtc_AutohausCar[playerid] -1;
    if(carid < 0)
    {
    carid = AhCars;
    }
    new car,preis,counter;
    for(new ah = 0; ah < sizeof(dtcKaufliste);ah++)
    {
    if(dtcKaufliste[ah][dtc_Autohaus] == autohaus)
    {
    if( counter == carid)
    {
    car = dtcKaufliste[ah][dtc_CarModel];
    preis = dtcKaufliste[ah][dtc_CarPreis];
    }
    counter ++;
    }
    }
    new c1 = random(120);
    new c2 = random(120);
    DestroyVehicle(dtc_AutohausSCar[playerid]);
    dtc_AutohausSCar[playerid] = CreateVehicle(car, DtcSonstiges[autohaus][1][0],DtcSonstiges[autohaus][1][1],DtcSonstiges[autohaus][1][2],DtcSonstiges[autohaus][1][3],c1,c2,-1);
    SetVehicleVirtualWorld(dtc_AutohausSCar[playerid],55+playerid);
    new string[246];
    TextDrawHideForPlayer(playerid,CarKauf[playerid]);
    TextDrawDestroy(CarKauf[playerid]);
    format(string,sizeof(string),"~r~---------- AUTOHAUS ----------~n~~g~Fahrzeug: ~w~%s~n~~g~Preis: ~w~$%d~n~~b~Auswählen:~n~~w~ <Num 4<~b~&~w~>Num 6> ~n~~b~Kaufen:~w~ Enter ~n~~b~Abbrechen:~w~ Tab",CarName[car-400],preis);
    CarKauf[playerid] = TextDrawCreate(200,310,string);
    TextDrawAlignment(CarKauf[playerid],1);
    TextDrawUseBox(CarKauf[playerid],1);
    TextDrawBoxColor(CarKauf[playerid],0x000000FF);
    TextDrawSetOutline(CarKauf[playerid],1);
    TextDrawBackgroundColor(CarKauf[playerid],COLOR_BLACK);
    TextDrawFont(CarKauf[playerid], 2);
    //TextDrawSetProportional(CarKauf[playerid], 2);
    TextDrawTextSize(CarKauf[playerid],450,410);
    TextDrawShowForPlayer(playerid,CarKauf[playerid]);
    dtc_AutohausCar[playerid] = carid;
    }
    if(newkeys == 16)//Enter
    {
    new carid = dtc_AutohausCar[playerid];
    new preis,counter;
    for(new ah = 0; ah < sizeof(dtcKaufliste);ah++)
    {
    if(dtcKaufliste[ah][dtc_Autohaus] == autohaus)
    {
    if( counter == carid)
    {
    preis = dtcKaufliste[ah][dtc_CarPreis];
    }
    counter ++;
    }
    }
    if(GetPlayerMoney(playerid) < preis)
    {
    SendClientMessage(playerid,COLOR_GREY,"Du hast nicht genug Geld um dieses Fahrzeug zu kaufen!");
    return 1;
    }
    DestroyVehicle(dtc_AutohausSCar[playerid]);
    SetPlayerPos(playerid, DtcSonstiges[autohaus][4][0],DtcSonstiges[autohaus][4][1],DtcSonstiges[autohaus][4][2]);
    SetPlayerFacingAngle(playerid,DtcSonstiges[autohaus][4][3]);
    dtc_AutohausCar[playerid] = 0;
    dtc_AutohausCat[playerid] = 2000;
    SetPlayerVirtualWorld(playerid,0);
    TextDrawHideForPlayer(playerid,CarKauf[playerid]);
    TextDrawDestroy(CarKauf[playerid]);
    TogglePlayerControllable(playerid,1);
    SetCameraBehindPlayer(playerid);
    //ResetPlayer
    }
    if(newkeys == KEY_ACTION) //Tab
    {
    //ResetPlayer
    DestroyVehicle(dtc_AutohausSCar[playerid]);
    SetPlayerPos(playerid, DtcSonstiges[autohaus][4][0],DtcSonstiges[autohaus][4][1],DtcSonstiges[autohaus][4][2]);
    SetPlayerFacingAngle(playerid,DtcSonstiges[autohaus][4][3]);
    dtc_AutohausCar[playerid] = 0;
    dtc_AutohausCat[playerid] = 2000;
    SetPlayerVirtualWorld(playerid,0);
    TextDrawHideForPlayer(playerid,CarKauf[playerid]);
    TextDrawDestroy(CarKauf[playerid]);
    TogglePlayerControllable(playerid,1);
    SetCameraBehindPlayer(playerid);
    }
    }


    Weiß jemand etwas dabei :S

  • Kann ich dir in dein gm rein machen ist einfach das ist dtc cars von loh was damals sehr gut war :)