Register/login

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
  • Moin Leute ich hab da ma eine frage Worann kann es Liegen das mein server die Accounts net Speichert Muss mich immer Neu Anmelden... hab
    hab schon nach geschaut aber hab nix Gefunden an was es Liegen kann des wegen frage ich euch ob jemand Villeicht ne ahnung hat an was es Liegen kann...


    MFG HUNTER

  • Ja Klar hab ich.... Schauts Selber.....



    format(string, sizeof(string), "Accounts/%s.ini", plname);
    if(fexist(string))
    {
    gPlayerAccount[playerid] = 1;
    SendClientMessage(playerid, COLOR_RED, "=====================================================");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_WHITE, "Willkommen auf Second-Reallife");
    SendClientMessage(playerid, COLOR_WHITE, "Gib dein Passwort in die Box ein, um dich einzuloggen.");
    SendClientMessage(playerid, COLOR_WHITE, "Viel Spaß auf unserem Server!");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_RED, "=====================================================");
    return 1;
    }
    else
    {
    gPlayerAccount[playerid] = 0;
    SendClientMessage(playerid, COLOR_RED, "=====================================================");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_WHITE, "Willkommen auf Second-Reallife");
    SendClientMessage(playerid, COLOR_WHITE, "Gib ein Passwort in die Box ein, um dich zu registrieren.");
    SendClientMessage(playerid, COLOR_WHITE, "Viel Spaß auf unserem Server! Wenn du Probleme hast, benutze /report!");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_RED, "=====================================================");
    return 1;
    }


    }


    EDITE: Er Leg Dich datei dan an zb hunter.ini aber sobald ich runter gehe und dann wieder drauf JOine Steht a Bitte regestire dich und dann wird die datei wieder neu angelegt also Überschriben so gesagt der saved es net
    mfg hunter

  • Hier


    public OnPlayerDisconnect(playerid,reason)
    {
    //Autohaus
    for( new i = 0; i < Max_Player_Cars; i++)
    {
    new dateiname[MAX_PLAYER_NAME+4];
    new playername[MAX_PLAYER_NAME];
    new var[256];
    GetPlayerName(playerid, playername, sizeof(playername));
    format(dateiname, sizeof(dateiname), "Autos/%s%d.car", playername, i);
    new File: CarFile = fopen(dateiname, io_write);
    format(var, 256, "AH_Typ=%i\n", Carlist[playerid][i][Typ]); fwrite(CarFile, var);
    format(var, 256, "AH_X=%f\n", Carlist[playerid][i][pos_X]); fwrite(CarFile, var);
    format(var, 256, "AH_Y=%f\n", Carlist[playerid][i][pos_Y]); fwrite(CarFile, var);
    format(var, 256, "AH_Z=%f\n", Carlist[playerid][i][pos_Z]); fwrite(CarFile, var);
    format(var, 256, "AH_Rot=%f\n", Carlist[playerid][i][Rotation]); fwrite(CarFile, var);
    format(var, 256, "AH_Status=%i\n", Carlist[playerid][i][Status]); fwrite(CarFile, var);
    format(var, 256, "AH_Lock=%i\n", Carlist[playerid][i][Lock]); fwrite(CarFile, var);
    format(var, 256, "AH_Paintjob=%i\n", Carlist[playerid][i][Paintjob]); fwrite(CarFile, var);
    format(var, 256, "AH_Farbe1=%i\n", Carlist[playerid][i][Farbe1]); fwrite(CarFile, var);
    format(var, 256, "AH_Farbe2=%i\n", Carlist[playerid][i][Farbe2]); fwrite(CarFile, var);
    format(var, 256, "AH_mod1=%i\n", Carlist[playerid][i][mod1]); fwrite(CarFile, var);
    format(var, 256, "AH_mod2=%i\n", Carlist[playerid][i][mod2]); fwrite(CarFile, var);
    format(var, 256, "AH_mod3=%i\n", Carlist[playerid][i][mod3]); fwrite(CarFile, var);
    format(var, 256, "AH_mod4=%i\n", Carlist[playerid][i][mod4]); fwrite(CarFile, var);
    format(var, 256, "AH_mod5=%i\n", Carlist[playerid][i][mod5]); fwrite(CarFile, var);
    format(var, 256, "AH_mod6=%i\n", Carlist[playerid][i][mod6]); fwrite(CarFile, var);
    format(var, 256, "AH_mod7=%i\n", Carlist[playerid][i][mod7]); fwrite(CarFile, var);
    format(var, 256, "AH_mod8=%i\n", Carlist[playerid][i][mod8]); fwrite(CarFile, var);
    format(var, 256, "AH_mod9=%i\n", Carlist[playerid][i][mod9]); fwrite(CarFile, var);
    format(var, 256, "AH_mod10=%i\n", Carlist[playerid][i][mod10]); fwrite(CarFile, var);
    format(var, 256, "AH_mod11=%i\n", Carlist[playerid][i][mod11]); fwrite(CarFile, var);
    format(var, 256, "AH_mod12=%i\n", Carlist[playerid][i][mod12]); fwrite(CarFile, var);
    format(var, 256, "AH_mod13=%i\n", Carlist[playerid][i][mod13]); fwrite(CarFile, var);
    format(var, 256, "AH_mod14=%i\n", Carlist[playerid][i][mod14]); fwrite(CarFile, var);
    format(var, 256, "AH_mod15=%i\n", Carlist[playerid][i][mod15]); fwrite(CarFile, var);
    format(var, 256, "AH_mod16=%i\n", Carlist[playerid][i][mod16]); fwrite(CarFile, var);
    format(var, 256, "AH_mod17=%i\n", Carlist[playerid][i][mod17]); fwrite(CarFile, var);
    fclose(CarFile);
    if(Carlist[playerid][i][Carid]!=-1)
    {
    SetVehicleParamsForAll(Carlist[playerid][i][Carid],0,0);
    DestroyVehicle(Carlist[playerid][i][Carid]);
    Carlist[playerid][i][Carid]=-1;
    }
    if (Spectating[playerid][0]!=-1)
    {
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    }
    }


    //Visen
    sfvisum[playerid] = 0;
    bsvisum[playerid] = 0;
    lvvisum[playerid] = 0;


    //StreamObject_OnPlayerDisconnect(playerid);
    //MidoStreamDisconnect(playerid);
    gPingWarnings[playerid]=0;
    gActivePlayers[playerid]--;
    numplayers--;
    PlayerInfo[playerid][pAdjustable] = 1;
    OnPlayerUpdategF(playerid);



    new spieler[256];
    new stringteext[256];


    switch(reason)
    {
    case 0:
    {
    GetPlayerName(playerid, spieler, sizeof(spieler));
    format(stringteext, sizeof(stringteext), "%s hat den Server verlassen (Timeout) (ID: %d).", spieler,playerid);
    SendClientMessageToAll(0x14EB1F96, stringteext);
    }
    case 1:
    {
    GetPlayerName(playerid, spieler, sizeof(spieler));
    format(stringteext, sizeof(stringteext), "%s hat denn Server verlassen (ID: %d).", spieler,playerid);
    SendClientMessageToAll(0x14EB1F96, stringteext);
    }
    case 2:
    {
    GetPlayerName(playerid, spieler, sizeof(spieler));
    format(stringteext, sizeof(stringteext), "%s hat den Server verlassen (error/exe-crash) (ID: %d)", spieler,playerid);
    SendClientMessageToAll(0x14EB1F96, stringteext);
    }
    }



    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(TaxiAccepted[i] < 999)
    {
    if(TaxiAccepted[i] == playerid)
    {
    TaxiAccepted[i] = 999;
    GameTextForPlayer(i, "~w~Taxianrufer~n~~r~ ist untergetaucht", 5000, 1);
    TaxiCallTime[i] = 0;
    DisablePlayerCheckpoint(i);
    }
    }
    else if(BusAccepted[i] < 999)
    {
    if(BusAccepted[i] == playerid)
    {
    BusAccepted[i] = 999;
    GameTextForPlayer(i, "~w~Kunde ist~n~~r~ untergetaucht", 5000, 1);
    BusCallTime[i] = 0;
    DisablePlayerCheckpoint(i);
    }
    }
    }
    }
    if(GettingCK[playerid] < 999)
    {
    if(IsPlayerConnected(GettingCK[playerid]))
    {
    SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Dein Charakterkill hat den Server verlassen. Probier es später nocheinmal.");
    OnCK[GettingCK[playerid]] = 999;
    }
    }
    if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
    {
    if(IsPlayerConnected(TransportDriver[playerid]))
    {
    new string[64];
    TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
    TransportTime[TransportDriver[playerid]] = 0;
    TransportCost[TransportDriver[playerid]] = 0;
    format(string, sizeof(string), "~w~Passagier weg~n~~g~%d$ verdient",TransportCost[playerid]);
    GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
    }
    }
    if(GotHit[playerid] > 0)
    {
    if(GetChased[playerid] < 999)
    {
    if(IsPlayerConnected(GetChased[playerid]))
    {
    SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Dein Auftrag ist untergetaucht.");
    GoChase[GetChased[playerid]] = 999;
    }
    }
    }
    if(PlayerPaintballing[playerid] != 0)
    {
    PaintballPlayers --;
    }
    if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
    {
    KartingPlayers --;
    }
    if(HireCar[playerid] != 299)
    {
    gLastDriver[HireCar[playerid]] = 300;
    gCarLock[HireCar[playerid]] = 0;
    UnLockCar(HireCar[playerid]);
    }
    if (gLastCar[playerid] > 0)
    {
    gLastDriver[gLastCar[playerid]] = 300;
    if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
    {
    gCarLock[gLastCar[playerid]] = 0;
    UnLockCar(gLastCar[playerid]);
    }
    }
    if(PlayerBoxing[playerid] > 0)
    {
    if(Boxer1 == playerid)
    {
    if(IsPlayerConnected(Boxer2))
    {
    PlayerBoxing[Boxer2] = 0;
    SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
    SetPlayerInterior(Boxer2, 5);
    GameTextForPlayer(Boxer2, "~r~Match unterbrochen", 5000, 1);
    }
    }
    else if(Boxer2 == playerid)
    {
    if(IsPlayerConnected(Boxer1))
    {
    PlayerBoxing[Boxer1] = 0;
    SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
    SetPlayerInterior(Boxer1, 5);
    GameTextForPlayer(Boxer1, "~r~Match unterbrochen", 5000, 1);
    }
    }
    InRing = 0;
    RoundStarted = 0;
    Boxer1 = 255;
    Boxer2 = 255;
    TBoxer = 255;
    }
    if(TransportDuty[playerid] == 1)
    {
    TaxiDrivers -= 1;
    }
    else if(TransportDuty[playerid] == 2)
    {
    BusDrivers -= 1;
    }
    if(PlayerInfo[playerid][pJob] == 11)
    {
    if(JobDuty[playerid] == 1) { Medics -= 1; }
    }
    else if(PlayerInfo[playerid][pJob] == 7)
    {
    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
    }
    }

  • Edite: Problem Gelöst Bitte Closed



    mfg hunter

    Einmal editiert, zuletzt von Project49_hunteR ()