Bei Autokauf werden keine Kosten abgezogen

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
  • Wie die überschrifft schon sagt wird keine Asche abgezogen :(


    Wenn es der richtige Code ist :D


    for(new x = 0; x < AUTOHAUSER;x++)
    {
    if(PlayerToPoint(1.5, playerid, DtcSonstiges[x][0][0],DtcSonstiges[x][0][1],DtcSonstiges[x][0][2]) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]] || pickupid == Dtc_Info[x] && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    TogglePlayerControllable(playerid, 0);
    SetPlayerVirtualWorld(playerid,55+playerid);
    new string[246];
    dtc_AutohausCar[playerid] = 0;
    dtc_AutohausCat[playerid] = x;
    new c1 = random(120);
    new c2 = random(120);
    new car;
    new preis;
    for(new ah = 0; ah < sizeof(dtcKaufliste);ah++)
    {
    if(car == 0 && dtcKaufliste[ah][dtc_Autohaus] == x)
    {
    car = dtcKaufliste[ah][dtc_CarModel];
    preis = dtcKaufliste[ah][dtc_CarModel];
    }
    }
    SetPlayerCameraPos(playerid, DtcSonstiges[x][2][0],DtcSonstiges[x][2][1],DtcSonstiges[x][2][2]);
    SetPlayerCameraLookAt(playerid, DtcSonstiges[x][1][0],DtcSonstiges[x][1][1],DtcSonstiges[x][1][2]);
    dtc_AutohausSCar[playerid] = CreateVehicle(car, DtcSonstiges[x][1][0],DtcSonstiges[x][1][1],DtcSonstiges[x][1][2],DtcSonstiges[x][1][3],c1,c2,-1);
    SetPlayerPos(playerid, DtcSonstiges[x][3][0],DtcSonstiges[x][3][1],DtcSonstiges[x][3][2]);
    SetVehicleVirtualWorld(dtc_AutohausSCar[playerid],55+playerid);
    format(string,sizeof(string),"~r~---------- AUTOHAUS ----------~n~~g~Fahrzeug: ~w~%s~n~~g~Preis: ~w~€%d~n~~b~Auswaehlen:~n~~w~ <Num 4<~b~&~w~>Num 6> ~n~~b~Kaufen:~w~ Enter ~n~~b~Abbrechen:~w~ Tab",CarName[car-400],preis);
    if(!CarKauf[playerid])
    {
    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);
    TextDrawSetOutline(CarKauf[playerid],1);
    TextDrawFont(CarKauf[playerid], 2);
    //TextDrawSetProportional(CarKauf[playerid], 2);
    TextDrawTextSize(CarKauf[playerid],450,410);
    TextDrawShowForPlayer(playerid,CarKauf[playerid]);
    }
    else
    {


    Wer aufhört, besser werden zu wollen, hört auf, gut zu sein.