Beiträge von ____

    cool, ich brauchs zwar nicht, aber für manche die mal am Laptop sind oderso (weil der PC schrott ist :( ) und kein Pawn zur verfügung haben! und ich war auch heute krank :) find gut gelungen auch das design!

    jo ist eigl alles richtig.


    EDIT:


    das kackt nur ab wenn ich die Funktion nutze also wenn ich bei OnGameModeInit das mache:

    AddCar(429,2372.8540,-1890.9448,13.0625,217.9484,0,3,-1);


    haste vielleicht Teamviewer damite dir das ansehen kannst?


    THX auf jedenfall das jmd mal geantwortet hat :D

    Hi,


    was ist hier falsch?


    Es kommt keine fehlermeldung aber der Server-samp.exe scheißt immer ab wenn es Gamemode lädt.

    public AddCar(model,Float:x,Float:y,Float:z,Float:angle,color1,color2,delay)
    {
    new FoundID = 0;
    new cID;
    new string[128];
    new File:file;


    if(model > 399 && model < 612)
    {
    for ( new i = 1; FoundID <= 0 ; i++)
    {
    format(string,sizeof(string),"/Vehicles/%d.ini",i);
    if(!fexist(string))
    {
    cID = i;
    FoundID = 1;
    }
    if( i > MAX_VEHICLES )
    {
    return 1;
    }
    }
    format(string,sizeof(string),"/Vehicles/%d.ini",cID);
    file = fopen(string,io_write);
    new TextToWriteInFile[256];
    format(TextToWriteInFile,sizeof TextToWriteInFile, "Model=%d\r\nVehicleX=%f\r\nVehicleY=%f\r\nVehicleZ=%f\r\nVehicleA=%f\r\nVehicleKM=%f\r\nVehicleKM2=%f\r\nVehicleTank=%f\r\nVehicleHealth=%f\r\nVehicleColor1=%d\r\nVehicleColor2=%d \r\nVehicleOwner=%s \r\nVehicleKey1%s \r\nVehicleNumberPlate=%s\r\nMotorschaden=%d \r\nVehicleID=%d \r\n",
    VehicleInfo[cID][VehicleModel],
    VehicleInfo[cID][VehicleX],
    VehicleInfo[cID][VehicleY],
    VehicleInfo[cID][VehicleZ],
    VehicleInfo[cID][VehicleA],
    VehicleInfo[cID][VehicleKM],
    VehicleInfo[cID][VehicleKM2],
    VehicleInfo[cID][VehicleTank],
    VehicleInfo[cID][VehicleHealth],
    VehicleInfo[cID][VehicleColor1],
    VehicleInfo[cID][VehicleColor2],
    VehicleInfo[cID][VehicleOwner],
    VehicleInfo[cID][VehicleKey1],
    VehicleInfo[cID][VehicleNumberPlate],
    VehicleInfo[cID][Motorschaden],
    VehicleInfo[cID][VehicleID]
    );
    fwrite(file, string);
    fclose(file);
    VehicleInfo[cID][VehicleModel] = model;
    VehicleInfo[cID][VehicleX] = x;
    VehicleInfo[cID][VehicleY] = y;
    VehicleInfo[cID][VehicleZ] = z;
    VehicleInfo[cID][VehicleA] = angle;
    VehicleInfo[cID][VehicleColor1] = color1;
    VehicleInfo[cID][VehicleColor2] = color2;
    format(VehicleInfo[cID][VehicleOwner], MAX_PLAYER_NAME, "[NONE]");
    }
    else
    {//Invalid Model
    return 1;
    }
    return cID;


    }


    mfg

    auf jeden fall ist der fehler hier irgendwo:



    format(string,sizeof(string),"/Vehicles/%d.ini",cID);
    file = fopen(string,io_write);
    new TextToWriteInFile[256];
    format(TextToWriteInFile,sizeof TextToWriteInFile, "Model=%d\r\nVehicleX=%f\r\nVehicleY=%f\r\nVehicleZ=%f\r\nVehicleA=%f\r\nVehicleKM=%f\r\nVehicleKM2=%f\r\nVehicleTank=%f\r\nVehicleHealth=%f\r\nVehicleColor1=%d\r\nVehicleColor2=%d \r\nVehicleOwner=%s \r\nVehicleKey1%s \r\nVehicleNumberPlate=%s\r\nMotorschaden=%d \r\nVehicleID=%d \r\n",
    VehicleInfo[cID][VehicleModel],
    VehicleInfo[cID][VehicleX],
    VehicleInfo[cID][VehicleY],
    VehicleInfo[cID][VehicleZ],
    VehicleInfo[cID][VehicleA],
    VehicleInfo[cID][VehicleKM],
    VehicleInfo[cID][VehicleKM2],
    VehicleInfo[cID][VehicleTank],
    VehicleInfo[cID][VehicleHealth],
    VehicleInfo[cID][VehicleColor1],
    VehicleInfo[cID][VehicleColor2],
    VehicleInfo[cID][VehicleOwner],
    VehicleInfo[cID][VehicleKey1],
    VehicleInfo[cID][VehicleNumberPlate],
    VehicleInfo[cID][Motorschaden],
    VehicleInfo[cID][VehicleID]
    );
    fwrite(file,TextToWriteInFile);


    aber da sehe ich kein fehler :X