Beiträge von Corvus

    Hä? 8| Frag doch direkt ab:
    if(Gas[VID] < vehTank[GetVehicleModel(VID)-400])


    Und benutze statt den define (der übrigens nicht korrekt ist, lass ihn lieber raus) vehTank[GetVehicleModel(veh)-400].


    Wie meinste das also soll ich den #define oben komplet weglassen?

    Guten Tag,
    Ich habe das so gemacht:
    #define GasMax vehTank[GetVehicleModel(veh)-400]
    new vehTank[212] =
    {
    250,
    175,
    105,
    650,
    65,
    85,
    1450,
    564,....


    Nun habe ich folgendes Problem da das davor so war:
    #define GasMax 1000


    Errors:
    if(IsPlayerConnected(playerid))
    {
    new VID,
    FillUp,
    string[256],
    TankKosten;
    VID = GetPlayerVehicleID(playerid);
    FillUp = GasMax - Gas[VID];//1. Error
    TogglePlayerControllable(playerid, 1);
    if(Refueling[playerid] == 1){
    if(Gas[VID] < GasMax){//Error 2.
    for(new TB = 0; TB < sizeof(TankenBizInfo); TB++){
    if(PlayerToPoint(5, playerid, TankenBizInfo[TB][TBPosX], TankenBizInfo[TB][TBPosY], TankenBizInfo[TB][TBPosZ]) && TankenBizInfo[TB][TBProducts] > 0){
    TankKosten = FillUp * TankenBizInfo[TB][TBSpritPreis];
    if(IsACopCar(VID) || IsAOAmtCar(VID) || IsAMedicCar(VID))
    {
    Gas[VID] += FillUp;
    TankenBizInfo[TB][TBProducts] -= FillUp;
    format(string,sizeof(string),"* Du hast deinen Dienstwagen für $%d auf Kosten des Staates betankt.", TankKosten);
    SendClientMessage(playerid, COLOR_LIGHTBLUE,string);
    TankenBizInfo[TB][TBKasse] += TankKosten;
    ExtortionTankenBiz(TB, TankKosten/100*10);
    Refueling[playerid] = 0;
    Update3DTextTanke(TB);
    }


    :\Users\Daniel\Desktop\irp.pwn(10042) : error 017: undefined symbol "veh"
    C:\Users\Daniel\Desktop\irp.pwn(10045) : error 017: undefined symbol "veh"
    C:\Users\Daniel\Desktop\irp.pwn(13936) : error 017: undefined symbol "veh"
    forward MustCarRefuel(playerid, carid);
    public MustCarRefuel(playerid, carid)
    {
    if(GetVehicleModel(carid) == 482)
    {
    if(Gas[carid] < 100)
    {
    new string[156];
    new FillUp,
    TankKosten;
    FillUp = GasMax - Gas[carid];//3.Error Zeile
    TankKosten = FillUp * 30;
    Gas[carid] += FillUp;
    format(string,sizeof(string),"* Du hast das Fahrzeug für $%d (30$ pro Liter)betankt.", TankKosten);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    GivePlayerMoneys(playerid, -TankKosten);
    return 1;
    }
    }
    return 1;
    }
    Danke im vorraus,

    Corvus:
    In dem Code finde ich keine Variable oder sonst etwas was "vehicleid" heißt, daher kann es nicht sein, dass in den Zeilen "vehicleid" nicht definiert ist, es ist ja nicht verwendet.
    Das einzige was mir auffällt ist, dass die Variable bei dir jetzt "Gas" heißt, und nicht mehr "vehTank".
    Ansonsten passen die Error-Meldungen aber nicht zu dem Code, bzw. der Code nicht zu den Meldungen. :wacko:


    Hab das nun so:
    #define GasMax vehTank[GetVehicleModel(veh)-400]
    Das Problem liegt daran:
    public Fillup(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    new VID, //Andere Variable
    FillUp,
    string[256],
    TankKosten;
    VID = GetPlayerVehicleID(playerid); //Doppelte Auslesung weil wir oben schon das ja deklariert haben.
    FillUp = GasMax - Gas[VID];
    TogglePlayerControllable(playerid, 1);
    if(Refueling[playerid] == 1){
    if(Gas[VID] < GasMax){//hier wird abgezogen aber oben ist da anderst deklariert und somit geht das nicht.
    for(new TB = 0; TB < sizeof(TankenBizInfo); TB++){
    if(PlayerToPoint(5, playerid, TankenBizInfo[TB][TBPosX], TankenBizInfo[TB][TBPosY], TankenBizInfo[TB][TBPosZ]) && TankenBizInfo[TB][TBProducts] > 0){
    TankKosten = FillUp * TankenBizInfo[TB][TBSpritPreis];
    if(IsACopCar(VID) || IsAOAmtCar(VID) || IsAMedicCar(VID))
    {
    Gas[VID] += FillUp;
    TankenBizInfo[TB][TBProducts] -= FillUp;
    format(string,sizeof(string),"* Du hast deinen Dienstwagen für $%d auf Kosten des Staates betankt.", TankKosten);
    SendClientMessage(playerid, COLOR_LIGHTBLUE,string);
    TankenBizInfo[TB][TBKasse] += TankKosten;
    ExtortionTankenBiz(TB, TankKosten/100*10);
    Refueling[playerid] = 0;
    Update3DTextTanke(TB);
    }
    Sobald ich das an oben anpasse bekomme ich Gamemode Unknown

    Die Fehlermeldungen passen nicht zu den Code Zeilen. Da stimmt irgendwas nicht, schau nochmal nach.


    Hier:public Fillup(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    new VID,
    FillUp,
    string[256],
    TankKosten;
    VID = GetPlayerVehicleID(playerid);//hier
    FillUp = GasMax - Gas[VID];
    TogglePlayerControllable(playerid, 1);
    if(Refueling[playerid] == 1){
    if(Gas[VID] < GasMax){
    for(new TB = 0; TB < sizeof(TankenBizInfo); TB++){
    if(PlayerToPoint(5, playerid, TankenBizInfo[TB][TBPosX], TankenBizInfo[TB][TBPosY], TankenBizInfo[TB][TBPosZ]) && TankenBizInfo[TB][TBProducts] > 0){
    TankKosten = FillUp * TankenBizInfo[TB][TBSpritPreis];
    if(IsACopCar(VID) || IsAOAmtCar(VID) || IsAMedicCar(VID))
    {
    Gas[VID] += FillUp;
    TankenBizInfo[TB][TBProducts] -= FillUp;
    format(string,sizeof(string),"* Du hast deinen Dienstwagen für $%d auf Kosten des Staates betankt.", TankKosten);
    SendClientMessage(playerid, COLOR_LIGHTBLUE,string);
    TankenBizInfo[TB][TBKasse] += TankKosten;
    ExtortionTankenBiz(TB, TankKosten/100*10);
    Refueling[playerid] = 0;
    Update3DTextTanke(TB);
    }

    Was willst du denn machen?
    Auf die Variable mit den maximalen Tank Mengen kannst du so zugreifen:


    vehTank[GetVehicleModel(vehicleid)-400]


    Was willst du denn machen?
    Auf die Variable mit den maximalen Tank Mengen kannst du so zugreifen:


    vehTank[GetVehicleModel(vehicleid)-400]


    Daraus entstehen folgende Errors:
    C:\Users\Daniel\Desktop\irp.pwn(10042) : error 017: undefined symbol "vehicleid"
    C:\Users\Daniel\Desktop\irp.pwn(10045) : error 017: undefined symbol "vehicleid"
    C:\Users\Daniel\Desktop\irp.pwn(12410) : error 017: undefined symbol "vehicleid"
    C:\Users\Daniel\Desktop\irp.pwn(13938) : error 017: undefined symbol "vehicleid"
    C:\Users\Daniel\Desktop\irp.pwn(27456) : error 017: undefined symbol "vehicleid"


    VID = GetPlayerVehicleID(playerid);
    FillUp = GasMax - Gas[VID];//1.Error
    if(Gas[VID] < GasMax){//2.Error
    for(new veh = 0; veh < MAX_VEHICLES; veh++)
    {
    Gas[veh] = GasMax;
    VehicleObject[veh] = -1;
    }//3.Error
    FillUp = GasMax - Gas[carid];//4Error


    for(new veh = 0; veh < MAX_VEHICLES; veh++){
    Gas[veh] = GasMax;
    }//5.Error

    Ich habe das so gemacht:
    new vehTank[212] =
    {
    250,
    175,
    105,
    650,
    65,
    85,
    1450,
    564,
    234,
    156,
    80,
    124,
    134,
    87,
    87,
    150,
    235,
    560,
    123,
    100,
    100,
    100,
    150,
    165,
    65,
    560,
    120,
    150,
    250,
    123,
    256,
    180,
    750,
    345,
    85,
    25,
    134,
    256,
    100,
    100,
    100,
    25,
    124,
    434,
    734,
    100,
    700,
    563,
    35,
    1000,
    100,.....


    wie muss ich es nun definieren:
    #define GasMax

    Warum habe ich folgende Errors:
    if(strcmp("/buygarage", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    GetPlayerName(playerid, playername, sizeof(playername));
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    for(new g = 0; g < sizeof(GarageInfo); g++) //Hier
    {
    if(PlayerToPoint(2.0, playerid, GarageInfo[g][gEntrancex], GarageInfo[g][gEntrancey], GarageInfo[g][gEntrancez]) && GarageInfo[g][gOwned] == 0) //Hier
    {
    if(PlayerInfo[playerid][pLevel] < GarageInfo[g][gLevel])
    {
    format(string, sizeof(string), " Du musst Level %d sein um dieses Garage kaufen zu können!", GarageInfo[g][gLevel]);
    SendClientMessage(playerid, COLOR_ERRORTEXT, string);
    return 1;
    }
    if(PlayerInfo[playerid][pCash] > GarageInfo[g][gPreis])
    {
    GarageInfo[g][gOwned] = 1;
    GetPlayerName(playerid, sendername, sizeof(sendername));
    strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
    GivePlayerMoneys(playerid,-GarageInfo[g][gPreis]);
    StuffInfo[sSteuerkasse] += GarageInfo[g][gPreis];
    GarageInfo[g][gKasse] = 0;
    GameTextForPlayer(playerid, "~w~Willkommen in deiner Garage~n~Du kannst deine Garage jederzeit mit /exit verlassen", 5000, 3);
    Update3DTextGarage(g);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast nicht genug Geld um dir das Haus kaufen zu können !");
    return 1;
    }
    }
    }
    }
    return 1;
    }


    enum GarageInfo
    {
    Float:gEntrancex,
    Float:gEntrancey,
    Float:gEntrancez,
    Float:gExitx,
    Float:gExity,
    Float:gExitz,
    hOwner[MAX_PLAYER_NAME],
    hBeschreibung[128],
    gPreis,
    gInt,
    gLock,
    gLevel,
    };
    new GaragenInfo[MaxGarage][GarageInfo] =
    {
    {651.2974,-1513.7551,14.8516,175,1302.519897,-1.787510,1001.028259,"Staat","Große Garage", 250000,18,1,5,
    };
    C:\Users\Daniel\Desktop\irp.pwn(21746) : error 039: constant symbol has no size
    C:\Users\Daniel\Desktop\irp.pwn(21748) : error 028: invalid subscript (not an array or too many subscripts): "GarageInfo"
    C:\Users\Daniel\Desktop\irp.pwn(21748) : warning 215: expression has no effect
    C:\Users\Daniel\Desktop\irp.pwn(21748) : error 001: expected token: ";", but found "]"
    C:\Users\Daniel\Desktop\irp.pwn(21748) : error 029: invalid expression, assumed zero
    C:\Users\Daniel\Desktop\irp.pwn(21748) : fatal error 107: too many error messages on one line



    //edit Errors & Warning eingefügt.

    Guten Tag,
    Ich such nach einer Lösung da mein PC langsamer wird und meine SSD Festplatte voll ist.
    Gibt es eine Möglichkeit alle Programme/Dateien zu Deinstallieren aber Windows 7 installiert zu lassen.


    Danke im vorraus.
    Mfg,

    Fail xD
    if(strcmp(cmd, "/engine",true) == 0 || strcmp(cmd, "/motor",true) == 0)
    {
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(vid != INVALID_VEHICLE_ID)
    {
    if(engine == VEHICLE_PARAMS_ON)
    {
    StopEngine(playerid,vid);
    SendClientMessage(playerid,COLOR_GRAD2," Motor abgeschaltet.");
    }
    else
    {
    if(Gas[vid] > 0){
    if(Maske[playerid] == 0) {
    SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 30.0, 2000); SetTimerEx("StartEngineSleep",800,0,"i",playerid);
    }
    else {
    SetPlayerChatBubble(playerid, "* jemand startet einen Motor", COLOR_PURPLE, 30.0, 2000); SetTimerEx("StartEngineSleep",800,0,"i",playerid);
    }
    SendClientMessage(playerid,COLOR_GRAD2," Motor wird gestartet.");
    if(SpawnKillAktiv[playerid] == 1) { SpawnSkillSchutz(playerid);
    return 1;
    }
    new typ = IsAutohausCar(vid);
    new GATyp = IsGangAutohausCar(vid);
    if(typ != -1 || GATyp != -1){
    SendClientMessage(playerid,COLOR_GRAD2," Du hast keinen Schlüssel für das Fahrzeug.");
    return 1;
    }
    if(IsAMedicCar(vid)){
    if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { }
    else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht bei den Medics !"); return 1; }
    }
    if(IsAFahrschulCar(vid)){
    if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || TakingLesson[playerid] == 1){}
    else{
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht bei der Fahrschule oder in einer Fahrstunde.");
    return 1;
    }}
    if(IsAFahrschulCar(vid)){
    if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || TakingLesson[playerid] == 2){}
    CP[playerid] = 24;
    return 1;
    }
    if(IsATruckerCar(vid)){
    if(PlayerInfo[playerid][pJob] == 16){}
    else{
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist kein Trucker !");
    return 1;
    }}
    if(IsANewsCar(vid)){
    if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9){}
    else{
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht bei den News Reportern !");
    return 1;
    }}
    if(IsAOAmtCar(vid)){
    if(!IsAOrdnungsbeamter(playerid)){
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist nicht beim Ordnungsamt !");
    return 1;
    }}
    if(IsACopCar(vid)){
    if(IsACop(playerid) && OnDuty[playerid] == 1){}
    else{
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist kein Cop oder nicht OnDuty !");
    return 1;
    }}
    for(new h = 0; h < sizeof(PilotFlug); h++){
    if(GetPlayerVehicleID(playerid) == PilotFlug[h]){
    if(PlayerInfo[playerid][pJob] == 18)
    {
    }
    else
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!");
    return 1;
    }}}
    for(new h = 0; h < sizeof(buscars); h++){
    if(GetPlayerVehicleID(playerid) == buscars[h]){
    if(PlayerInfo[playerid][pJob] == 19)
    {
    }
    else
    {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!");
    return 1;
    }}}
    for(new h = 0; h < sizeof(RobTransporter); h++){
    if(GetPlayerVehicleID(playerid) == RobTransporter[h]){
    if(TransporterRobberID == playerid || IsACop(playerid) && OnDuty[playerid] == 1){}
    else {
    SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!");
    return 1;
    }}}
    for(new h = 0; h < sizeof(GangAutoInfo); h++){
    if(vid == GangAutoInfo[h][cID]){
    if(PlayerInfo[playerid][pMember] == GangAutoInfo[h][cOwner] || PlayerInfo[playerid][pLeader] == GangAutoInfo[h][cOwner] || TakingLesson[playerid] == 1 && GangAutoInfo[h][cOwner] == 1 || GangAutoInfo[h][cOwner] == 11 || (GangAutoInfo[h][cOwner] == 7 || GangAutoInfo[h][cOwner] == 14 || GangAutoInfo[h][cOwner] == 16) && IsACop(playerid)) { }
    else {
    SendClientMessage(playerid, COLOR_ERRORTEXT, "Du hast keinen Schlüssel für das Fahrzeug!"); return 1; }
    break;
    }}
    for(new h = 0; h < sizeof(MechanikerWagenCars); h++) {
    if(vid == MechanikerWagenCars[h]) {
    if(PlayerInfo[playerid][pJob] == 7) { }
    else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug! !"); return 1; }
    }}
    for(new h = 0; h < sizeof(Drescher); h++) {
    if(vid == Drescher[h]) {
    if(PlayerInfo[playerid][pJob] == 10) {
    if(CP[playerid] == 50) { }
    else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du musst erst mit /harvest die Ernte bestätiegen um den Motor Starten zu können!"); return 1; } }
    else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!"); return 1; }
    }}
    for(new car = 0; car < sizeof(MulmanInfo); car++){
    if(vid == MulmanInfo[car][MmCarID]){
    if(MulmanInfo[car][MmLeiher] != playerid){
    if(PlayerInfo[playerid][pJob] == 20) { SendClientMessage(playerid, COLOR_GRAD4, " Du musst das Fahrzeug erst Mieten, dies kannst du mit /reservecar machen."); }
    else { SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keinen Schlüssel für das Fahrzeug!"); }
    return 1;
    }}}
    if(Maske[playerid] == 0) { format(string, sizeof(string), "* %s startet den Motor",sendername); SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 30.0, 2000); }
    else { SetPlayerChatBubble(playerid, "* jemand startet einen Motor", COLOR_PURPLE, 30.0, 2000); }
    SetTimerEx("StartEngineSleep",1300,0,"i",playerid);
    format(string,sizeof(string),"%s macht de motor an/aus.", sendername);
    Entertolog("motor",string);
    if(SpawnKillAktiv[playerid] == 1) { SpawnSkillSchutz(playerid);}
    }
    else { SendClientMessage(playerid,COLOR_GRAD2," Tank leer..."); return 1; }
    }
    }
    return 1;
    }

    Schritt für Schritt geht's weiter.
    format(string, sizeof(string), "Du hast dir erfolgreich für %s$ ein/einen %s gekauft!",GetPoint(preis),Kaufliste[Carlist[playerid][CarKey[playerid]][Typ]][Name]);
    zu:
    format(string, sizeof(string), "Du hast dir erfolgreich für %s$ ein/einen %s gekauft!",GetPoint(preis),Kaufliste[Spectating[playerid]][Name]);


    Danke funktioniert :love:

    Folgendes:
    [00:45:37] OnPlayerDeath: message sent
    [00:45:37] OnPlayerDeath: message sent1
    [00:45:37] 13
    [00:45:37] OnPlayerDeath: message sent3
    [00:45:37] OnPlayerDeath: message sent4
    [00:45:37] OnPlayerDeath: message sent5
    [00:45:37] OnPlayerDeath: message sent6
    [00:45:37] OnPlayerDeath: message sent7
    [00:45:37] OnPlayerDeath: message sent8
    [00:45:37] OnPlayerDeath: message sent9
    [00:45:37] ingarage=0
    [00:45:37] ingarage=0
    [00:45:37] carid = 284
    [00:45:37] string={FFFF00}E-RP-{21DD00}284
    [00:45:37] Gas: 100
    [00:45:37] Locked: 0
    [00:45:37] Vor components
    [00:45:37] Nach components
    [00:45:37] i:0
    [00:45:37] i:1
    [00:45:37] i:2
    [00:45:37] returning: 284
    [00:45:37] OnPlayerDeath: message sent10
    [00:45:37] OnPlayerDeath: message sent11
    [00:45:37] OnPlayerDeath: message sent12
    [00:45:37] OnPlayerDeath: message sent13
    [00:45:37] [debug] Run time error 4: "Array index out of bounds"
    [00:45:37] [debug] Accessing element at index 419 past array upper bound 44
    [00:45:37] [debug] AMX backtrace:
    [00:45:37] [debug] #0 000d6b70 in public ocmdOnPlayerCommandText (playerid=0, cmdtext[]=@0x0040b058 "") at D:\Users\Admin\Desktop\irp.pwn:16640
    [00:45:37] [debug] #1 000028f8 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0x0040b038 "") at D:\Users\Admin\Desktop\Gamemode\pawno\pawno\include\ocmd.inc:34

    Folgendes:
    [00:29:27] OnPlayerDeath: message sent
    [00:29:27] OnPlayerDeath: message sent1
    [00:29:27] 14
    [00:29:27] OnPlayerDeath: message sent3
    [00:29:27] OnPlayerDeath: message sent4
    [00:29:27] OnPlayerDeath: message sent5
    [00:29:27] OnPlayerDeath: message sent6
    [00:29:27] OnPlayerDeath: message sent7
    [00:29:27] OnPlayerDeath: message sent8
    [00:29:27] OnPlayerDeath: message sent9
    [00:29:27] ingarage=0
    [00:29:27] ingarage=0
    [00:29:27] [debug] Run time error 4: "Array index out of bounds"
    [00:29:27] [debug] Accessing element at index 545 past array upper bound 44
    [00:29:27] [debug] AMX backtrace:
    [00:29:27] [debug] #0 0022b9b8 in public CreateTunedCar (playerid=0, CarKey1=0) at D:\Users\Admin\Desktop\irp.pwn:42662
    [00:29:27] [debug] #1 000d4e90 in public ocmdOnPlayerCommandText (playerid=0, cmdtext[]=@0x0040b058 "") at D:\Users\Admin\Desktop\irp.pwn:16612
    [00:29:27] [debug] #2 000028f8 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0x0040b038 "") at D:\Users\Admin\Desktop\Gamemode\pawno\pawno\include\ocmd.inc:34

    Hier:
    public CreateTunedCar(playerid, CarKey1)
    {
    printf("ingarage=%i",Carlist[playerid][CarKey1][ingarage]);
    if(IsPlayerConnected(playerid) && Carlist[playerid][CarKey1][Typ] != -1)
    {
    printf("ingarage=%i",Carlist[playerid][CarKey1][ingarage]);
    if(Carlist[playerid][CarKey1][ingarage] == 1) return 1;
    // new carid = CreateVehicle(Kaufliste[Carlist[playerid][CarKey1][Typ]][Modelid],Carlist[playerid][CarKey1][SpawnSaveX],Carlist[playerid][CarKey1][SpawnSaveY],Carlist[playerid][CarKey1][SpawnSaveZ],Carlist[playerid][CarKey1][SpawnSaveRot],-1,-1,-1);
    new carid = CreateVehicle(Kaufliste[Carlist[playerid][CarKey1][Typ]][Modelid],Carlist[playerid][CarKey1][pos_x],Carlist[playerid][CarKey1][pos_y],Carlist[playerid][CarKey1][pos_z],Carlist[playerid][CarKey1][z_angle],-1,-1,-1);
    new string[50];
    format(string, sizeof(string), "{FFFF00}E-RP-{21DD00}%d", carid);
    SetVehicleNumberPlate(carid,string);
    Gas[carid] = Carlist[playerid][CarKey1][TankVolumen];
    Locked[carid] = Carlist[playerid][CarKey1][Lock];
    if(Carlist[playerid][CarKey1][Lock] == 1){
    ForAllPlayers(i){
    SetVehicleParamsForPlayer(carid,i,0,1);
    }
    }
    if(Carlist[playerid][CarKey1][mod1]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod1]); }
    if(Carlist[playerid][CarKey1][mod2]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod2]); }
    if(Carlist[playerid][CarKey1][mod3]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod3]); }
    if(Carlist[playerid][CarKey1][mod4]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod4]); }
    if(Carlist[playerid][CarKey1][mod5]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod5]); }
    if(Carlist[playerid][CarKey1][mod6]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod6]); }
    if(Carlist[playerid][CarKey1][mod7]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod7]); }
    if(Carlist[playerid][CarKey1][mod8]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod8]); }
    if(Carlist[playerid][CarKey1][mod9]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod9]); }
    if(Carlist[playerid][CarKey1][mod10]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod10]); }
    if(Carlist[playerid][CarKey1][mod11]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod11]); }
    if(Carlist[playerid][CarKey1][mod12]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod12]); }
    if(Carlist[playerid][CarKey1][mod13]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod13]); }
    if(Carlist[playerid][CarKey1][mod14]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod14]); }
    if(Carlist[playerid][CarKey1][mod15]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod15]); }
    if(Carlist[playerid][CarKey1][mod16]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod16]); }
    if(Carlist[playerid][CarKey1][mod17]!=-1) { AddVehicleComponent(carid,Carlist[playerid][CarKey1][mod17]); }
    if(Carlist[playerid][CarKey1][Paintjob]!=-1) { ChangeVehiclePaintjob(carid,Carlist[playerid][CarKey1][Paintjob]); }
    if(Carlist[playerid][CarKey1][Farbe1]!=-1) { ChangeVehicleColor(carid,Carlist[playerid][CarKey1][Farbe1],Carlist[playerid][CarKey1][Farbe2]); }
    for(new i; i<MaxVeh[playerid]; i++){
    if(Carlist[playerid][i][Neon]!=0){
    switch(Carlist[playerid][i][NeonType]){
    case 0:AttachObjectToVehicle(CreateObject(18647,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18647,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    case 1:AttachObjectToVehicle(CreateObject(18648,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18648,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    case 2:AttachObjectToVehicle(CreateObject(18649,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18649,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    case 3:AttachObjectToVehicle(CreateObject(18650,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18650,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    case 4:AttachObjectToVehicle(CreateObject(18651,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18651,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    case 5:AttachObjectToVehicle(CreateObject(18652,0,0,0,0,0,0), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0), AttachObjectToVehicle(CreateObject(18652,0,0,0,0,0,0), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    }
    }
    return carid;
    }
    return -1;
    }

    stock EnterToLog(const log[], const logtext[])
    {
    new filestring[512];
    format(filestring, sizeof filestring, "logs/%s.txt", log);
    new File:file = fopen(filestring, io_append);
    fwrite(file, logtext);
    fclose(file);
    return 1;
    }


    Server Crased wegen dem System