Beiträge von wurzelsep96

    Halo an alle die dies lesen,
    ich habe schon seit längeren ein großes Problem aus meinen Server.
    Mein Autohaus-System will einfach nicht gehen.
    Wenn ich mir ein Auto kaufe, funktonieren die Befehle wie z.b. /carlock usw. nicht mehr, da kommt immer "Server Unknown Comand"
    anschließend wenn ich reloage, kommt kein Login-Fenster mehr.


    Ich hoffe mir kann ürgendwer helfen, bin für jeden Tipp, der den Fehler behebn könnte dankbar.


    Hier mein Autohaus-System :

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




    new SideL, SideR, Dtc_Info[AUTOHAUSER];
    new dtc_AutohausCar[MAX_PLAYERS], dtc_AutohausCat[MAX_PLAYERS], dtc_AutohausSCar[MAX_PLAYERS];
    new Dtc_PlayerHaveCar[MAX_PLAYERS][MaxVeh];
    new Dtc_PlayerKey[MAX_PLAYERS];
    new RadZahl[AUTOHAUSER];
    new Dtc_Carlock[700];
    new Text: CarKauf[MAX_PLAYERS];




    enum dtcCarModell
    {
    dtc_Autohaus,
    dtc_CarModel,
    dtc_CarPreis
    };



    new dtcKaufliste[][dtcCarModell] =
    {
    //0 = Bike Autohaus
    {0,462,5000}, //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,522,120000}, //NRG



    //1 = Vip Autohaus
    //{1,486,100000}, //DOZER
    //{1,494,130000}, //Hotring Racer
    //{1,502,100000}, //Hotring Racer1
    //{1,503,100000}, //Hotring Racer2
    //{1,504,100000}, //Bloodring Racer
    {1,495,104000}, //Sandking
    //{1,444,110000}, //MonsterTruck
    {1,531,50000}, //Farmtraktor
    {1,508,80000}, //Journey
    {1,539,10000}, //Vortex
    {1,509,500}, //BIKE
    {1,510,500}, //BIKR
    //{1,556,100000}, //MonsterA
    //{1,557,100000}, //MonsterB
    {1,434,80000}, //Hotknife
    {1,530,50000}, //Stabler
    {1,571,50000}, //KART
    {1,572,50000}, //MOWER
    {1,573,150000}, //Dune
    {1,574,50000}, //Sweeper
    {1,583,100000}, //TUG
    //{1,488,100000}, //SAN NEWS HELI
    {1,471,24000}, //Quat
    {1,516,40000}, //Nebula
    {1,529,35000}, //Willard
    //{1,544,12200}, //Feuerwehrwagen
    {1,546,10300}, //Intruder
    {1,549,14200}, //Tampa
    {1,551,15200}, //Merit
    {1,568,100000}, //Bandito
    {1,576,120800}, //Tornado
    {1,580,45500}, //Stefford
    {1,603,12000}, //Phoenix
    {1,409,135000}, //Stretch
    {1,541,265000}, //Bullet
    {1,411,100000}, //Infernus
    {1,457,185000}, //Caddy
    {1,424,305000}, //BF Injection
    {1,565,100000}, //Flash
    {1,403,74000}, //Linerunner
    {1,514,68000}, //Tanker
    {1,515,55000}, //Roadtrain
    {1,470,44500}, //Patriot



    // 2 = Biliges Autohaus
    {2,467,6000}, //Oceanic
    {2,536,10000}, //Blade
    {2,534,7000}, //Remigton
    {2,567,12000}, //Savanna
    {2,535,27000}, //Slamvan
    {2,412,7500}, //Voodo
    {2,426,30000}, //Premier
    {2,421,30000}, // 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,11000}, //Vincent
    {2,404,9500}, //Peren
    {2,413,15000}, //Pony
    {2,458,12500}, //Solair
    {2,479,12500}, //Regina
    {2,440,25200}, //Rumpo
    {2,423,15200}, //Eiswagen (Mrwhoop)
    {2,483,14100}, //Camper
    {2,500,12500}, //Mesa
    {2,508,45600}, //Journey
    {2,554,35000}, //Yosemite
    {2,561,35700}, //Startum
    {2,489,23000}, //Rancher
    {2,543,15000}, //Sadler
    {2,442,10000}, //Leichenwagen
    {2,527,6000}, //Cadrona



    // Luxus Autohaus
    {3,533,70000}, //Feltzer
    {3,579,57000}, //Huntley
    {3,507,55000}, //Elegant
    {3,419,12000}, //Esperant
    {3,526,95500}, //Fortune
    {3,602,74000}, //Alpha
    {3,400,23000}, //Landstal
    {3,545,12000}, //Hustler
    {3,405,13000}, //Sentinel
    {3,445,16500}, //Admiral
    {3,475,15400}, //Sabre
    {3,409,1200000}, //Stretch
    {3,562,185000}, //Elegy
    {3,560,205000}, //Sultan
    {3,429,110000}, //Banshee
    {3,402,100000}, //Buffalo
    {3,541,1000000}, //Bullet
    {3,411,1000000}, //Infernus
    {3,415,240000}, //Cheetah
    {3,589,170000}, //Club
    {3,559,150000}, //Jester
    {3,603,120000}, //Phönix
    {3,506,250000}, //Supergt
    {3,451,330000}, //Turismo
    {3,558,180000}, //Uranus
    {3,480,140000}, //Comet
    {3,477,210000}, //Zr350
    {3,565,150000}, //flash
    {3,482,15000}, //burrito
    {3,494,3000000}, //hotring
    {3,502,3000000}, //hotring
    {3,503,3000000}, //hotring
    {3,495,1000000}, //sandking
    {3,568,220000}, //Bandito
    {3,580,50000}, //stafford



    //2 = LS AIRPORT (Flugzeuge & Helikopter)
    {4,487,600000}, //Maverick
    {4,469,300000}, //Spearrow
    {4,511,200000}, //Beagle
    {4,593,150000}, //Dodo
    {4,513,150000}, //Stunt Flugzeug
    {4,563,400000}, //Raindance
    {4,519,1000000}, //Shamal



    // Boots Autohaus
    //{5,430,600}, //Predator
    {5,446,812000}, //Squallo
    {5,452,452000}, //Speeder
    {5,453,50000}, //Reefer
    {5,454,380000}, //Tropic
    {5,484,577000}, //Marquis
    {5,472,75000}, //Coastguard
    {5,473,100000}, //Dinghy
    {5,493,665000} //Jetmax
    };



    new Float:DtcParkPlatz[AUTOHAUSER][MAXPARKPLATZE][6] = {
    {//Bike Autohaus
    {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}
    },
    {//Vipautohaus
    {1358.6565,-1677.0625,14.2140, 0.0},
    {1352.7611,-1635.9846,14.1316, 0.0},
    {1358.8470,-1625.9791,14.2096, 0.0},
    {1374.1926,-1667.9106,13.8534, 0.0}
    },
    {//LS Biliges Autohaus
    {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 Luxus Autohaus
    {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}
    },
    {//LS Boots Autohaus
    {-143.5681,-1820.9989,-0.6451,257.6810},
    {-139.4363,-1802.0128,-0.5331,258.8536},
    {-135.3319,-1779.2094,-0.5934,258.2228},
    {-131.6279,-1757.7664,-0.6196,259.0080}
    }
    };





    new Float:DtcSonstiges[AUTOHAUSER][5][4] =
    {
    {// Bike Autohaus
    {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
    },
    {// VIPAutohaus
    {55.8692, -309.8162, 1.6051, 98.6395}, // 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
    {1360.0192, -1658.7026, 13.3828, 272.6918} // LiveView Player Exit
    },
    {//LS Biliges Autohaus
    {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 Luxus Autohaus
    {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
    },
    {//LS Boots Autohaus
    {-207.0457,-1778.9010,1.8197,83.5860}, // Info Zeichen etc.
    {-224.6904,-1877.9922,-0.4114,42.8227}, // LiveView Car
    {-246.4832, -1887.0842, 23.2854, 0.0}, // LiveView Cam
    {-201.7943,-1778.6981,1.8197,262.2440}, // LiveView Player
    {-201.7943,-1778.6981,1.8197,262.2440} // 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[9],
    };
    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"
    };



    OnPlayerConnect



    /*for(new i = 0; i < AUTOHAUSER; i++)
    {
    SetPlayerMapIcon(playerid, 30+i, DtcSonstiges[0][0],DtcSonstiges[0][1],DtcSonstiges[0][2], 55, COLOR_YELLOW);
    }*/





    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] = 0;
    }
    OnPlayerCarLogin(playerid);
    for(new i = 0; i < 700; i++)
    {
    if(Dtc_Carlock)
    {
    SetVehicleParamsForPlayer(i,playerid,0,1);
    }
    }



    Function OnPlayerPickUpPickup(playerid,pickupid)



    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
    {
    TextDrawHideForPlayer(playerid,CarKauf[playerid]);
    TextDrawSetString(CarKauf[playerid],string);
    TextDrawShowForPlayer(playerid,CarKauf[playerid]);
    }
    }
    else 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]])
    {
    new mv = MaxVeh;
    if(mv > 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du besitzt schon ein Fahrzeug mit deinem Ausgewählten Schlüssel !");
    SendClientMessage(playerid, COLOR_GREY, " Verkaufe es mit /carsell oder wechsel den Schlüssel mit /carkey !");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du besitzt schon ein Fahrzeug! Verkaufe es mit /carsell");
    }
    }
    }




    OnPlayerKeyStateChange



    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) //right (6 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~Auswaehlen:~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) //left (4 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~Auswaehlen:~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 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 ++;
    }
    }
    if(GetPlayerMoney(playerid) < preis){SendClientMessage(playerid,COLOR_GREY,"Du hast nicht genug Geld um dieses Fahrzeug zu kaufen!");} else {OnPlayerBuyCar(playerid,car,preis,autohaus);}
    //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);
    }
    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);
    }
    }




    public OnGameModeInit()



    /*for(new i = 0; i < AUTOHAUSER; i++)
    {
    Dtc_Info = CreatePickup(1210, 2, DtcSonstiges[0][0],DtcSonstiges[0][1],DtcSonstiges[0][2],0);
    }*/




    public OnGameModeExit()



    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    OnPlayerCarUpdate(i);
    PlayerUpdate(i);
    gPlayerLogged = 0;
    DisablePlayerCheckpoint(i);
    }
    }
    for(new i = 0; i < AUTOHAUSER; i++)
    {
    DestroyPickup(Dtc_Info);
    }




    ------------------------------------------------------------------------------------------------------------------



    Function SetParkPlatz(playerid,Autohaus)
    {
    if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    if(Autohaus < AUTOHAUSER)
    {
    PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x] = DtcParkPlatz[Autohaus][RadZahl[Autohaus]][0];
    PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y] = DtcParkPlatz[Autohaus][RadZahl[Autohaus]][1];
    PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z] = DtcParkPlatz[Autohaus][RadZahl[Autohaus]][2];
    PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate] = DtcParkPlatz[Autohaus][RadZahl[Autohaus]][3];
    RadZahl[Autohaus] += 1;
    if(RadZahl[Autohaus] >= MAXPARKPLATZE)
    {
    RadZahl[Autohaus] = 0;
    }
    }
    }
    }



    Function OnPlayerBuyCar(playerid,Model,preis,Autohaus)//CARSYS
    {
    if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "*Du hast dir ein Auto gekauft.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Gehe zu der KFZ Stelle und hole dir ein Kennzeichen.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Fahre vorsichtig..Und denk an die StraßenVerkehrsOrdnung!");
    SendClientMessage(playerid, COLOR_LIGHTRED, "*ACHTUNG: Wenn du dein Auto parkst wirst du vom System gekickt und musst dich neu einloggen!");
    GivePlayerMoney(playerid, -preis);
    PlayerInfo[playerid][pCash] -= preis;
    SetParkPlatz(playerid,Autohaus);
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    new File: hFile = fopen(str, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=0\n");fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",Model);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=0\n");fwrite(hFile, var);
    format(var, 32, "CarHyd=0\n");fwrite(hFile, var);
    format(var, 32, "CarWheel=0\n");fwrite(hFile, var);
    format(var, 32, "CarAusp=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideL=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideR=0\n");fwrite(hFile, var);
    format(var, 32, "CarFB=0\n");fwrite(hFile, var);
    format(var, 32, "CarRB=0\n");fwrite(hFile, var);
    format(var, 32, "CarSpoiler=0\n");fwrite(hFile, var);
    format(var, 32, "CarRoof=0\n");fwrite(hFile, var);
    format(var, 32, "CarHood=0\n");fwrite(hFile, var);
    format(var, 32, "CarVents=0\n");fwrite(hFile, var);
    format(var, 32, "CarLamps=0\n");fwrite(hFile, var);
    format(var, 32, "CarPJ=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC1=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC2=-1\n");fwrite(hFile, var);
    format(var, 32, "Preis=%i\n",preis);fwrite(hFile, var);
    format(var, 32, "Plate=XXX\n");fwrite(hFile, var);
    fclose(hFile);
    }
    OnPlayerCarLogin(playerid);
    }
    }



    Function OnPlayerCarLogin(playerid)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(!Dtc_PlayerHaveCar[playerid][x])
    {
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Autos/%s%d.dtcar", playername2,x);
    new File: UserFile = fopen(string2, io_read);
    if (UserFile)
    {
    Dtc_PlayerHaveCar[playerid][x] = 1;
    new key[ 256 ] , val[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data );
    if( strcmp( key , "CarId" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarId] = strval( val ); }
    if( strcmp( key , "CarModel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarModel] = strval( val ); }
    if( strcmp( key , "CarPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_x] = floatstr( val ); }
    if( strcmp( key , "CarPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_y] = floatstr( val ); }
    if( strcmp( key , "CarPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_z] = floatstr( val ); }
    if( strcmp( key , "CarRotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRotate] = floatstr( val ); }
    if( strcmp( key , "CarNitro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarNitro] = strval( val ); }
    if( strcmp( key , "CarHyd" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHyd] = strval( val ); }
    if( strcmp( key , "CarWheel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarWheel] = strval( val ); }
    if( strcmp( key , "CarAusp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarAusp] = strval( val ); }
    if( strcmp( key , "CarSideL" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideL] = strval( val ); }
    if( strcmp( key , "CarSideR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideR] = strval( val ); }
    if( strcmp( key , "CarFB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarFB] = strval( val ); }
    if( strcmp( key , "CarRB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRB] = strval( val ); }
    if( strcmp( key , "CarSpoiler" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSpoiler] = strval( val ); }
    if( strcmp( key , "CarRoof" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRoof] = strval( val ); }
    if( strcmp( key , "CarHood" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHood] = strval( val ); }
    if( strcmp( key , "CarVents" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarVents] = strval( val ); }
    if( strcmp( key , "CarLamps" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarLamps] = strval( val ); }
    if( strcmp( key , "CarPJ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPJ] = strval( val ); }
    if( strcmp( key , "CarC1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC1] = strval( val ); }
    if( strcmp( key , "CarC2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC2] = strval( val ); }
    if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPreis] = strval( val ); }
    if( strcmp( key , "Plate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Plate] = strval( val ); }
    }
    fclose(UserFile);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }



    Function PlayerCarSpawn(playerid,Slot)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][Slot])
    {
    PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
    ChangeVehicleColor(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2]);
    if(PlayerCar[playerid][Slot][CarPJ] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarPJ]);}
    if(PlayerCar[playerid][Slot][CarNitro] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNitro]);}
    if(PlayerCar[playerid][Slot][CarHyd] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHyd]);}
    if(PlayerCar[playerid][Slot][CarWheel] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarWheel]);}
    if(PlayerCar[playerid][Slot][CarAusp] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarAusp]);}
    if(PlayerCar[playerid][Slot][CarSideL] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideL]);}
    if(PlayerCar[playerid][Slot][CarSideR] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideR]);}
    if(PlayerCar[playerid][Slot][CarFB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarFB]);}
    if(PlayerCar[playerid][Slot][CarRB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRB]);}
    if(PlayerCar[playerid][Slot][CarSpoiler] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSpoiler]);}
    if(PlayerCar[playerid][Slot][CarRoof] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRoof]);}
    if(PlayerCar[playerid][Slot][CarHood] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHood]);}
    if(PlayerCar[playerid][Slot][CarVents] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarVents]);}
    if(PlayerCar[playerid][Slot][CarLamps] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarLamps]);}
    if(Dtc_LockOnSpawn)
    {
    Dtc_Carlock[PlayerCar[playerid][Slot][CarId]] = 1;
    Dtc_LockCar(PlayerCar[playerid][Slot][CarId]);
    }
    new strings[9];
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    format(strings, sizeof(strings), "%s", dini_Get(str, "Plate"));
    SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings);
    SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]);
    for(new x = 0; x < MaxVeh; x++)
    {
    PlayerCar[playerid][x][Plate] = strings;
    }
    }
    }
    }



    Function OnVehicleMod(playerid,vehicleid,componentid)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if (vehicleid == PlayerCar[playerid][x][CarId] && Dtc_PlayerHaveCar[playerid][x])
    {
    if((componentid >= 1008) && (componentid <= 1010)) {PlayerCar[playerid][x][CarNitro] = componentid;}
    if((componentid >= 1142) && (componentid <= 1145)) {PlayerCar[playerid][x][CarVents] = componentid;}
    if((componentid == 1013) || (componentid == 1024)) {PlayerCar[playerid][x][CarLamps] = componentid;}
    if((componentid >= 1004) && (componentid <= 1005)||(componentid >= 1011) && (componentid <= 1012)) {PlayerCar[playerid][x][CarHood] = componentid;}
    if(componentid == 1087) {PlayerCar[playerid][x][CarHyd] = componentid;}
    if(componentid == 1086) {PlayerCar[playerid][x][CarHyd] = componentid;}
    if(IsAWheel(componentid)) {PlayerCar[playerid][x][CarWheel] = componentid;}
    if(IsAExhaust(componentid)) {PlayerCar[playerid][x][CarAusp] = componentid;}
    if(IsASideL(componentid)) {PlayerCar[playerid][x][CarSideL] = componentid; PlayerCar[playerid][x][CarSideR] = SideR;}
    if(IsASideR(componentid)) {PlayerCar[playerid][x][CarSideR] = componentid; PlayerCar[playerid][x][CarSideL] = SideL;}
    if(IsAFB(componentid)) {PlayerCar[playerid][x][CarFB] = componentid;}
    if(IsARB(componentid)) {PlayerCar[playerid][x][CarRB] = componentid;}
    if(IsASpoiler(componentid)) {PlayerCar[playerid][x][CarSpoiler] = componentid;}
    if(IsARoof(componentid)) {PlayerCar[playerid][x][CarRoof] = componentid;}
    }
    }
    return 1;
    }



    Function OnPlayerCarUpdate(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(Dtc_PlayerHaveCar[playerid][x])
    {
    DestroyVehicle(PlayerCar[playerid][x][CarId]);
    Dtc_Carlock[PlayerCar[playerid][x][CarId]] = 0;
    Dtc_LockCar(PlayerCar[playerid][x][CarId]);
    new string3[128];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), "/Autos/%s%d.dtcar", playername3,x);
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=%d\n",PlayerCar[playerid][x][CarId]);fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",PlayerCar[playerid][x][CarModel]);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][x][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][x][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][x][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][x][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=%d\n",PlayerCar[playerid][x][CarNitro]);fwrite(hFile, var);
    format(var, 32, "CarHyd=%d\n",PlayerCar[playerid][x][CarHyd]);fwrite(hFile, var);
    format(var, 32, "CarWheel=%d\n",PlayerCar[playerid][x][CarWheel]);fwrite(hFile, var);
    format(var, 32, "CarAusp=%d\n",PlayerCar[playerid][x][CarAusp]);fwrite(hFile, var);
    format(var, 32, "CarSideL=%d\n",PlayerCar[playerid][x][CarSideL]);fwrite(hFile, var);
    format(var, 32, "CarSideR=%d\n",PlayerCar[playerid][x][CarSideR]);fwrite(hFile, var);
    format(var, 32, "CarFB=%d\n",PlayerCar[playerid][x][CarFB]);fwrite(hFile, var);
    format(var, 32, "CarRB=%d\n",PlayerCar[playerid][x][CarRB]);fwrite(hFile, var);
    format(var, 32, "CarSpoiler=%d\n",PlayerCar[playerid][x][CarSpoiler]);fwrite(hFile, var);
    format(var, 32, "CarRoof=%d\n",PlayerCar[playerid][x][CarRoof]);fwrite(hFile, var);
    format(var, 32, "CarHood=%d\n",PlayerCar[playerid][x][CarHood]);fwrite(hFile, var);
    format(var, 32, "CarVents=%d\n",PlayerCar[playerid][x][CarVents]);fwrite(hFile, var);
    format(var, 32, "CarLamps=%d\n",PlayerCar[playerid][x][CarLamps]);fwrite(hFile, var);
    format(var, 32, "CarPJ=%d\n",PlayerCar[playerid][x][CarPJ]);fwrite(hFile, var);
    format(var, 32, "CarC1=%d\n",PlayerCar[playerid][x][CarC1]);fwrite(hFile, var);
    format(var, 32, "CarC2=%d\n",PlayerCar[playerid][x][CarC2]);fwrite(hFile, var);
    format(var, 32, "Plate=%s\n",PlayerCar[playerid][x][Plate]);fwrite(hFile, var);
    fclose(hFile);
    }
    }
    }
    }
    }



    Function Dtc_LockCar(carid)
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    SetVehicleParamsForPlayer(carid,i,0,1);
    }
    }
    }



    Function Dtc_UnLockCar(carid)
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    SetVehicleParamsForPlayer(carid,i,0,0);
    }
    }
    }

    Hallo an alle die dies lesen,
    Ich habe gestern bzw. heute mein Haus-System entbuggt bekommen.
    Ich möchte gerne, dass man nur mit den Adminrang 2002 die Interrior-ID 11 erstellen kann
    Die anderen Interriors-ID soll der Adminrang 2001 erstellen können.


    Ich habe bisher einiges probiert, habe aber es nicht so hinbekommen, das der Adminrang 2001 die Haus-ID 11 nicht verteilen/auswählen kann


    Hier die PWN

    if(!strcmp(cmd, "/createhouse", true))
    {
    if(PlayerInfo[playerid][pAdmin] >= 2001)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, Grey, "/hauserstellen [Preis] [Interior Typ ( /interiors )]");
    new housepreis = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, Grey, "/hauserstellen [Preis] [Interior Typ ( /interiors )]");
    new inttype = strval(tmp);
    if(inttype < 1 || inttype > 10 && PlayerInfo[playerid][pAdmin] >= 2001)
    {
    inttype -= 1;
    new i = GetHouseID(); if(i == -1) return SendClientMessage(playerid, ROT, "Es kann kein weiters Haus mehr erstellt werden! ( MAX_HOUSES erhöhen )");
    format(string, sizeof string, "/Houses/%d.ini", i);
    dini_Create(string);
    HouseInfo[i][hEntrx] = GetX(playerid);
    HouseInfo[i][hEntry] = GetY(playerid);
    HouseInfo[i][hEntrz] = GetZ(playerid);
    HouseInfo[i][hInt] = Interiors[inttype][interiorid];
    HouseInfo[i][hIntx] = Interiors[inttype][intpx];
    HouseInfo[i][hInty] = Interiors[inttype][intpy];
    HouseInfo[i][hIntz] = Interiors[inttype][intpz];
    HouseInfo[i][hIntid] = inttype;
    HouseInfo[i][hPrice] = housepreis;
    HouseInfo[i][hRentable] = 0;
    HouseInfo[i][hRent] = 50;
    HouseInfo[i][hOwned] = 0;
    format(HouseInfo[i][hOwner], MAX_PLAYER_NAME, "-");
    format(HouseInfo[i][hDescr], 50, "%s", Interiors[inttype][description]);
    format(string, sizeof string, "%s\nZum Verkauf\nPreis: %d$", HouseInfo[i][hDescr], HouseInfo[i][hPrice]);
    HouseInfo[i][hLabel] = CreateDynamic3DTextLabel(string, COLOR_HOUSELABEL, HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz], 15, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 15);
    HouseInfo[i][hPick] = CreateDynamicPickup(1273, 1, HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz]);
    HouseInfo[i][hKasse] = 0;
    HouseInfo[i][hLocked] = 1;
    SendClientMessage(playerid, COLOR_GREEN, "Haus erstellt!");
    SaveHouse(i);
    return 1;
    }
    else if(inttype < 1 || inttype > 11 && PlayerInfo[playerid][pAdmin] >= 2002)
    {
    inttype -= 1;
    new i = GetHouseID(); if(i == -1) return SendClientMessage(playerid, ROT, "Es kann kein weiters Haus mehr erstellt werden! ( MAX_HOUSES erhöhen )");
    format(string, sizeof string, "/Houses/%d.ini", i);
    dini_Create(string);
    HouseInfo[i][hEntrx] = GetX(playerid);
    HouseInfo[i][hEntry] = GetY(playerid);
    HouseInfo[i][hEntrz] = GetZ(playerid);
    HouseInfo[i][hInt] = Interiors[inttype][interiorid];
    HouseInfo[i][hIntx] = Interiors[inttype][intpx];
    HouseInfo[i][hInty] = Interiors[inttype][intpy];
    HouseInfo[i][hIntz] = Interiors[inttype][intpz];
    HouseInfo[i][hIntid] = inttype;
    HouseInfo[i][hPrice] = housepreis;
    HouseInfo[i][hRentable] = 0;
    HouseInfo[i][hRent] = 50;
    HouseInfo[i][hOwned] = 0;
    format(HouseInfo[i][hOwner], MAX_PLAYER_NAME, "-");
    format(HouseInfo[i][hDescr], 50, "%s", Interiors[inttype][description]);
    format(string, sizeof string, "%s\nZum Verkauf\nPreis: %d$", HouseInfo[i][hDescr], HouseInfo[i][hPrice]);
    HouseInfo[i][hLabel] = CreateDynamic3DTextLabel(string, COLOR_HOUSELABEL, HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz], 15, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 15);
    HouseInfo[i][hPick] = CreateDynamicPickup(1273, 1, HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz]);
    HouseInfo[i][hKasse] = 0;
    HouseInfo[i][hLocked] = 1;
    SendClientMessage(playerid, COLOR_GREEN, "Haus erstellt!");
    SaveHouse(i);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, Grey, "Ungültige Interior Typ ID! /interiors");
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, " "AMeldung" ");
    }
    return 1;
    }



    Ich hoffe Ihr versteht, was ich versuche und ich hoffe das mir jemand weiter helfen kann.



    Danke schon mal in vorraus.


    mfg
    wurzelsep96

    Hallo an alle die dies lesen,
    Ich habe heute die Fraktionskassen und die Acc`s neu gemacht, es funkt alles auf mein Home-Server.
    Aber bei meinen richtigen Server geht der Server nicht mehr an und ich weis leider nicht warum.


    Hier die Server_log:


    Ich hoffe mir kann jemand weiter helfen, da meine User bestimmt nicht lust habe lange zu Warten.


    mfg
    wurzelsep96

    Hallo an alle die dies lesen,
    Ich möchte gerne dass wenn jemand invitet wird, dass er nicht erneut invitet werden kann.
    Ich habe es bisher so getesttet
    PWN:

    if(strcmp(cmd, "/makeleader", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] >= 2002)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_YELLOW, "Benutze: /makeleader [playerid/Name]");
    return 1;
    }
    new para1;
    new level;
    para1 = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    level = strval(tmp);
    //if(level > 1 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Geh nicht tiefer als Nummer 0, oder höher als Nummer 1!"); return 1; }
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[para1][pFrakSperre] >= 0)
    {
    if(PlayerInfo[para1][CoLeader] == 1 || PlayerInfo[para1][Leader] == 1 || PlayerInfo[para1][Member] == 1)
    {
    new ftext[200];
    if(level == 0) { ftext = "---"; } else { ftext = Fracs[(level-1)]; }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), " Du hast %s die Leaderschaft der Fraktion %s gegeben.", giveplayer, ftext);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), " %s hat dir die Leaderschaft der Fraktion %s gegeben.", sendername, ftext);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), " AdmCmd: %s hat %s die Leaderschaft der Fraktion %s gegeben.", sendername, giveplayer, ftext);
    ABroadCast(0x00F5FFFF,string,2002);
    gTeam[para1] = 0;
    PlayerInfo[para1][pTeam] = 0;
    PlayerInfo[para1][pRank] = 5;
    PlayerInfo[para1][Leader] = 1;
    PlayerInfo[para1][pGehalt] = 0;
    SpawnPlayer(para1);
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, " Dieser Spieler ist bereits/noch in der ---!");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat eine FraktionsSperre!");
    return 1;
    }


    }
    }
    }
    }
    else
    {
    new stringn[150]; format(stringn, 150, "{FF0000}Fehler:{FFFFFF}* Der Befehl {9933FF}'%s'{FFFFFF} existiert nicht! Nutze {13EBE7}/hilfe{FFFFFF}!*", cmdtext);
    return SendClientMessage(playerid, BLAU, stringn);
    }
    Log("UnMake---Leader.txt",string);
    return 1;
    }


    Ich wollte das gleiche mit den befehl unmakeleader machen, und zwar genau ungekert, dass man eine meldung bekommt, wenn er nicht in der frak ist.
    hier die PWN :



    if(strcmp(cmd, "/unmakeleader", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] >= 2002)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_YELLOW, "Benutze: /unmakeleader [playerid/Name]");
    return 1;
    }
    new para1;
    new level;
    para1 = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    level = strval(tmp);
    //if(level > 1 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Geh nicht tiefer als Nummer 0, oder höher als Nummer 1!"); return 1; }
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[para1][pFrakSperre] >= 0)
    {
    if(PlayerInfo[para1][CoLeader] > 0 || PlayerInfo[para1][Leader] > 0 || PlayerInfo[para1][Member] > 0)
    {
    new ftext[200];
    if(level == 0) { ftext = "---"; } else { ftext = Fracs[(level-1)]; }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), " Du hast %s die Leaderschaft der Fraktion %s entfernt.", giveplayer, ftext);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), " %s hat dir die Leaderschaft der Fraktion %s entfernt.", sendername, ftext);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), " AdmCmd: %s hat %s die Leaderschaft der Fraktion %s entfernt.", sendername, giveplayer, ftext);
    ABroadCast(0x00F5FFFF,string,2002);
    gTeam[para1] = 0;
    PlayerInfo[para1][pTeam] = 0;
    PlayerInfo[para1][pRank] = 0;
    PlayerInfo[para1][Leader] = 0;
    PlayerInfo[para1][pGehalt] = 0;
    SpawnPlayer(para1);
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, " Dieser Spieler ist nicht in der ---!");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat eine FraktionsSperre!");
    return 1;
    }


    }
    }
    }
    }
    else
    {
    new stringn[150]; format(stringn, 150, "{FF0000}Fehler:{FFFFFF}* Der Befehl {9933FF}'%s'{FFFFFF} existiert nicht! Nutze {13EBE7}/hilfe{FFFFFF}!*", cmdtext);
    return SendClientMessage(playerid, BLAU, stringn);
    }
    Log("UnMake---Leader.txt",string);
    return 1;
    }


    Ich hoffe mir kann jemand weiter helfen.
    Danke an jeden, der mir versucht zu helfen.


    mfg
    wurzelsep96

    ok, hier ist das Server_log


    Zeig mal bitte wie du VehInfo und Gas deklariert hast :)

    Ich weis nicht genau was du willst.
    Ich hoffe das ist das richtige



    enum AutoControl
    {
    phyberLeftBlink,
    phyberRightBlink,
    phyberBlink[4],
    }


    new VehInfo[MAX_VEHICLES][AutoControl];



    //new Gas[CAR_AMOUNT]; //Betanken[MAX_PLAYERS];
    #define CAR_AMOUNT 700 //Change to Your Vehicle Amount
    new Gas[CAR_AMOUNT];


    Function CheckGas()
    {
    new string[256];
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
    {
    new playerid;
    new vehicle = GetPlayerVehicleID(i);
    new Model = GetVehicleModel(GetPlayerVehicleID(i));
    if(Gas[vehicle] >= 1)
    {
    if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
    if(gGas[i] == 1) {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~w~ %d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3); }
    if(IsAPlane(vehicle) && IsABoat(vehicle) && Model == 509 && Model == 510 && Model == 481)
    {
    Gas[vehicle]++;
    }
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new vid = GetPlayerVehicleID(i);
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(vid != INVALID_VEHICLE_ID)
    {
    if(engine == VEHICLE_PARAMS_ON)
    {
    Gas[vehicle]--;
    }
    }
    }
    else
    {
    NoFuel[i] = 1;
    FreezePlayer(i);
    GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~Kein Benzin mehr~n~Gib /exit zum ausgestiegen ein",1500,3);
    TogglePlayerControllable(playerid,true);
    }
    if(Gas[vehicle] > GetGasMax(GetVehicleModel(vehicle)))
    {
    Gas[vehicle] = GetGasMax(GetVehicleModel(vehicle));
    }
    }
    }
    }
    return 1;
    }


    Das ist aus dem Callback OnGameModeInit()
    for(new c=0;c<CAR_AMOUNT;c++)
    {
    Gas[code=c] = GetGasMax(GetVehicleModel(c));
    }

    Hier haste des Callback OnVehicleSpawn



    Function OnVehicleSpawn(vehicleid)
    {
    //Blinker System
    DestroyObject(VehInfo[vehicleid][phyberBlink][0]);
    DestroyObject(VehInfo[vehicleid][phyberBlink][1]);
    VehInfo[vehicleid][phyberRightBlink] = 0;
    DestroyObject(VehInfo[vehicleid][phyberBlink][2]);
    DestroyObject(VehInfo[vehicleid][phyberBlink][3]);
    VehInfo[vehicleid][phyberLeftBlink] = 0;
    //Blinker System Ende
    Gas[vehicleid] = GetGasMax(vehicleid);
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
    {
    if (vehicleid == PlayerCar[playerid][x][CarId])
    {
    SetTimerEx("CarTuning",700,0,"ii",playerid,x);
    }
    }
    }
    }
    for(new pv = 0; pv < sizeof(WheelVehs); pv++)
    {
    if(vehicleid == WheelVehs[pv])
    {
    SetTimerEx("WheelTuning", 700, 0, "i",vehicleid);
    }
    }
    /*if(IsAGangCar(vehicleid))
    {
    new vehmod = GetVehicleModel(vehicleid);
    if(vehmod != 487 && vehmod != 522 && vehmod != 463 && vehmod != 468 && vehmod != 471 && vehmod != 482)
    {
    AddVehicleComponent(vehicleid, 1010);
    }
    }*/
    return 1;
    }


    Hallo an alle die dies lesen,


    Ich habe folgendes Problem :
    Wenn ich Ingame mir ein Auto beim Autohaus kaufe geht zwar alles, aber wenn ich reloagen möchte kommt beim Game-start kein Loginfenster mehr.
    Ich habe schon semtliche sachen ausprobiert, aber nichts hilft.


    Ich hoffe mir kann jemand weiterhelfen


    Hier die PWN-Code :


    Register/Login Dialog

    if(dialogid == DIALOG_LOGIN)
    {
    if(response && strlen(inputtext) > 0)
    {
    OnPlayerLogin(playerid,inputtext);
    LoginTextForPlayer(playerid, 0);
    }
    else
    {


    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Willkommen
    auf Arcticbytes Reallife,\nbitte Logge dich nun
    ein!\n","Login","Abbrechen");
    }
    }
    if(dialogid == DIALOG_REG)
    {
    if(response)
    {


    ShowPlayerDialog(playerid,DIALOG_REG2,DIALOG_STYLE_PASSWORD,"Account
    erstellen","Gib das Passwort für deinen Account ein:","OK","Abbrechen");
    }
    else
    {


    ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"Account","Du
    benötigst einen Account, um auf Arcticbytes Reallife zu
    spielen!","Erstellen","Abbrechen");
    }
    }
    if(dialogid == DIALOG_REG2)
    {
    if(response && strlen(inputtext) > 0)
    {
    OnPlayerRegister(playerid,inputtext);
    }
    else
    {


    ShowPlayerDialog(playerid,DIALOG_REG2,DIALOG_STYLE_PASSWORD,"Account
    erstellen","Gib das Passwort für deinen Account ein:","OK","Abbrechen");
    }
    }



    Autohaus-System

    Function OnPlayerBuyCar(playerid,Model,preis,Autohaus)//CARSYS
    {
    if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "*Du hast dir ein Auto gekauft.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Gehe zu der KFZ Stelle und hole dir ein Kennzeichen.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Fahre vorsichtig..Und denk an die StraßenVerkehrsOrdnung!");
    SendClientMessage(playerid, COLOR_LIGHTRED, "*ACHTUNG: Wenn du dein Auto parkst wirst du vom System gekickt und musst dich neu einloggen!");
    GivePlayerMoney(playerid, -preis);
    PlayerInfo[playerid][pCash] -= preis;
    SetParkPlatz(playerid,Autohaus);
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    new File: hFile = fopen(str, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=0\n");fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",Model);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=0\n");fwrite(hFile, var);
    format(var, 32, "CarHyd=0\n");fwrite(hFile, var);
    format(var, 32, "CarWheel=0\n");fwrite(hFile, var);
    format(var, 32, "CarAusp=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideL=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideR=0\n");fwrite(hFile, var);
    format(var, 32, "CarFB=0\n");fwrite(hFile, var);
    format(var, 32, "CarRB=0\n");fwrite(hFile, var);
    format(var, 32, "CarSpoiler=0\n");fwrite(hFile, var);
    format(var, 32, "CarRoof=0\n");fwrite(hFile, var);
    format(var, 32, "CarHood=0\n");fwrite(hFile, var);
    format(var, 32, "CarVents=0\n");fwrite(hFile, var);
    format(var, 32, "CarLamps=0\n");fwrite(hFile, var);
    format(var, 32, "CarPJ=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC1=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC2=-1\n");fwrite(hFile, var);
    format(var, 32, "Preis=%d\n",preis);fwrite(hFile, var);
    format(var, 32, "Plate=XXX\n");fwrite(hFile, var);
    fclose(hFile);
    }
    OnPlayerCarLogin(playerid);
    }
    }


    Function OnPlayerCarLogin(playerid)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(!Dtc_PlayerHaveCar[playerid][x])
    {
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Autos/%s%d.dtcar", playername2,x);
    new File: UserFile = fopen(string2, io_read);
    if (UserFile)
    {
    Dtc_PlayerHaveCar[playerid][x] = 1;
    new key[ 256 ] , val[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data );
    if( strcmp( key , "CarId" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarId] = strval( val ); }
    if( strcmp( key , "CarModel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarModel] = strval( val ); }
    if( strcmp( key , "CarPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_x] = floatstr( val ); }
    if( strcmp( key , "CarPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_y] = floatstr( val ); }
    if( strcmp( key , "CarPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_z] = floatstr( val ); }
    if( strcmp( key , "CarRotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRotate] = floatstr( val ); }
    if( strcmp( key , "CarNitro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarNitro] = strval( val ); }
    if( strcmp( key , "CarHyd" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHyd] = strval( val ); }
    if( strcmp( key , "CarWheel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarWheel] = strval( val ); }
    if( strcmp( key , "CarAusp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarAusp] = strval( val ); }
    if( strcmp( key , "CarSideL" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideL] = strval( val ); }
    if( strcmp( key , "CarSideR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideR] = strval( val ); }
    if( strcmp( key , "CarFB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarFB] = strval( val ); }
    if( strcmp( key , "CarRB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRB] = strval( val ); }
    if( strcmp( key , "CarSpoiler" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSpoiler] = strval( val ); }
    if( strcmp( key , "CarRoof" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRoof] = strval( val ); }
    if( strcmp( key , "CarHood" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHood] = strval( val ); }
    if( strcmp( key , "CarVents" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarVents] = strval( val ); }
    if( strcmp( key , "CarLamps" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarLamps] = strval( val ); }
    if( strcmp( key , "CarPJ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPJ] = strval( val ); }
    if( strcmp( key , "CarC1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC1] = strval( val ); }
    if( strcmp( key , "CarC2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC2] = strval( val ); }
    if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPreis] = strval( val ); }
    if( strcmp( key , "Plate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Plate] = strval( val ); }
    }
    fclose(UserFile);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }



    falls euch noch etwas einfällt, bitte bescheit geben.
    falls Ihr noch einen Script-Teil braucht, einfach bescheit geben.


    Danke an alle die mir versuchen zu helfen und an die die es schaffen ;).



    mfg
    wurzelsep96

    Hallo an alle die dies lesen
    Ich habe folgendes Problem:
    Seit einiger zeit kommt es immer wieder vor, das sich die Acc`s immer wieder vertauschen (bezihungsweise das der Einloggdialog nicht kommt)
    Ich habe leider keine ahnung woran das liegt und habe auch schon das Register-System mehrmals mit anderen verglichen, habe aber keine Fehler gefunden.


    Daher meine Frage : Was habe ich an den Register-System falsch gemacht, das sich die Acc`s immer wieder vertauschen.


    Hier das Register-System:


    Hier der Pastebin-LINK


    Ich hoffe die Infos reichen aus, um den Fehler zu finden und zu beheben.
    Danke schonmal in vorraus


    mfg
    wurzelsep96

    hallo an alle die dies lesen


    Ich habe folgendes Problem:
    Ich möchte das man in Kennzeichen nur maximal 9 Bustabern/Zahlen benutzen kann, wenn man die überschreitet soll ein bestimter Text kommen, den ihr in der PWn sehen könnt.


    Hier die PWN:
    if(strcmp("/kennzeichen",true) == 0)
    {
    new kz[9];
    if(kz > 9)) { return SendClientMessage(playerid, COLOR_GRAD1, "Benutzung: /kennzeichen [Text(Höchstens 9 Buchstaben/Zahlen)]"); }
    if(!IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid, COLOR_GRAD1, "Du bist in keinem Fahrzeug!"); }
    if(KennzeichenErlaubnis[playerid] == 0) { return SendClientMessage(playerid, COLOR_GRAD1, "Du hast kein Kennzeichen in der Stadthalle gekauft!"); }
    if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    new vehiclefid = GetPlayerVehicleID(playerid);
    SetVehicleNumberPlate(vehiclefid, kz);
    SetVehicleToRespawn(vehiclefid);
    new Float: X,Float: Y,Float: Z;
    GetPlayerPos(playerid,X,Y,Z);
    SetVehiclePos(vehiclefid,X,Y,Z);
    PutPlayerInVehicle(playerid,vehiclefid,0);
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    dini_Set(str, "Plate", kz);
    for(new x = 0; x < MaxVeh; x++)
    {
    PlayerCar[playerid][x][Plate] = kz;
    }
    KennzeichenErlaubnis[playerid] = 0;
    }
    return 1;
    }


    hier habe ich noch Errors dazu die ich nicht weg bekomme

    Code
    C:\Users\ASUS\Desktop\Arcticbytes Reallife Orginal 5\gamemodes\ABR.pwn(30615) : error 035: argument type mismatch (argument 2)
    C:\Users\ASUS\Desktop\Arcticbytes Reallife Orginal 5\gamemodes\ABR.pwn(30618) : error 033: array must be indexed (variable "kz")
    C:\Users\ASUS\Desktop\Arcticbytes Reallife Orginal 5\gamemodes\ABR.pwn(30618) : error 029: invalid expression, assumed zero
    C:\Users\ASUS\Desktop\Arcticbytes Reallife Orginal 5\gamemodes\ABR.pwn(30619) : warning 225: unreachable code
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    
    
    3 Errors.


    Ich hoffe die Infos reichen aus mir zu Helfen



    mfg
    wurzelsep96

    Ich habe folgendes Problem seit 2-3Tagen kommen irgendwelche User auf unseren Server und lassen diesen mit eine so wie ich es mitbekommen habe "samp chrasher" oder einem Mod keine Ahnung chrashen sodass der Server einfach aus geht und wir ihn jedes mal neu starten müssen.
    Könnt ihr mir helfen eine lösung zu finde dass ich was ins Script einbauen kann oderso?


    MfG wurzelsep96



    Vielen Dank im Voraus.

    Habe ich schon probier, aber da kommt dan immer das das password nicht korekt ist, obwohl es das richtige password ist.



    So habe ich es gemacht:
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,sendername,sizeof(sendername));
    if(dialogid == DIALOG_LOGIN)
    {
    if(response && strlen(inputtext) > 0)
    {
    OnPlayerLogin(playerid,MD5_Hash(inputtext));
    LoginTextForPlayer(playerid, 0);
    }
    else
    {
    Kick(playerid);
    }
    }
    if(dialogid == DIALOG_REG)
    {
    if(response)
    {
    /*SetPlayerPos(playerid,1821.4423,-1317.9711,120.2656);
    SetPlayerCameraPos(playerid,1821.4235,-1314.1632,120.2656);
    SetPlayerCameraLookAt(playerid,1821.4512,-1314.5305,120.2656);
    SetPlayerSkin(playerid,60);*/
    ShowPlayerDialog(playerid,DIALOG_REG2,DIALOG_STYLE_PASSWORD,"Account erstellen","Gib das Passwort für deinen Account ein:","OK","Abbrechen");
    }
    else
    {
    /*SetPlayerPos(playerid,1821.4423,-1317.9711,120.2656);
    SetPlayerCameraPos(playerid,1821.4235,-1314.1632,120.2656);
    SetPlayerCameraLookAt(playerid,1821.4512,-1314.5305,120.2656);
    SetPlayerSkin(playerid,60);*/
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
    format(string,sizeof(string),"Herzlich Willkommen %i,\nUnsere Community heißt dich Willkommen und wir hoffen\ndas du Hier viel Spaß Hast\nKlicke auf 'Weiter' um dir einen Account zu Erstellen",playername);
    ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"Willkommen",string,"Erstellen","");
    }
    }
    if(dialogid == DIALOG_REG2)
    {
    if(response && strlen(inputtext) > 0)
    {
    /*SetPlayerPos(playerid,1821.4423,-1317.9711,120.2656);
    SetPlayerCameraPos(playerid,1821.4235,-1314.1632,120.2656);
    SetPlayerCameraLookAt(playerid,1821.4512,-1314.5305,120.2656);
    SetPlayerSkin(playerid,60);*/
    OnPlayerRegister(playerid,MD5_Hash(inputtext)); }
    else
    {
    /*SetPlayerPos(playerid,1821.4423,-1317.9711,120.2656);
    SetPlayerCameraPos(playerid,1821.4235,-1314.1632,120.2656);
    SetPlayerCameraLookAt(playerid,1821.4512,-1314.5305,120.2656);
    SetPlayerSkin(playerid,60);*/
    ShowPlayerDialog(playerid,DIALOG_REG2,DIALOG_STYLE_PASSWORD,"Account erstellen","Gib das Passwort für deinen Account ein:","OK","Abbrechen");
    }
    }




    mfg wurzelsep96