Ini Problem

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
  • Hey Leute ich habe ein Problem unzwar wenn ich mich auf meine Server regestrieren tuhe und dann aus dem Spiel gehe ist meine Ini größe 0 KB
    doch irgendwie trifft das nicht alle zu, andere können immer wieder rauf andere müssen sich dauernd neu regestrieren.
    Was kann der Fehler sein.


    Ich brauch dringend Hilfe.


    ;( bitte um schnelle Antwort

  • Hier einmal mein Login Public Qini:


    public OnPlayerLogin(playerid,password[])
    {


    SetTimer("firsttimer",20000,0);
    new tmp2[256];
    new string2[64];
    new playername2[MAX_PLAYER_NAME];
    //new Labeltext[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Accounts/%s.ini", playername2);
    new File: UserFile = fopen(string2, io_read);
    if ( UserFile )
    {
    new PassData[128];
    new keytmp[256], valtmp[256];
    //new names[128];
    fread( UserFile , PassData , sizeof( PassData ) );
    keytmp = ini_GetKey( PassData );
    if( strcmp( keytmp , "Key" , true ) == 0 )
    {
    valtmp = ini_GetValue( PassData );
    strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
    }
    if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
    {
    new key[ 256 ] , val[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data );
    if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
    if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
    if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = strval( val ); }
    if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
    if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
    if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
    if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
    if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
    if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
    if( strcmp( key , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCK] = strval( val ); }
    if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
    if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
    if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
    if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
    if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); }
    if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
    if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
    if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
    if( strcmp( key , "WantedDeaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedDeaths] = strval( val ); }
    if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
    if( strcmp( key , "LottoNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); }
    if( strcmp( key , "Fishes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishes] = strval( val ); }
    if( strcmp( key , "BiggestFish" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBiggestFish] = strval( val ); }
    if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); }
    if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); }
    if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = strval( val ); }
    if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
    if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); }
    if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
    if( strcmp( key , "Drugs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = strval( val ); }
    if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
    if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
    if( strcmp( key , "FMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
    if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
    if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
    if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pContractTime] = strval( val ); }
    if( strcmp( key , "WaffenSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWaffenSkill] = strval( val ); }
    if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDetSkill] = strval( val ); }
    if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexSkill] = strval( val ); }
    if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); }
    if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawSkill] = strval( val ); }
    if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechSkill] = strval( val ); }
    if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackSkill] = strval( val ); }
    if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarSkill] = strval( val ); }
    if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNewsSkill] = strval( val ); }
    if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsSkill] = strval( val ); }
    if( strcmp( key , "CookSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCookSkill] = strval( val ); }
    if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishSkill] = strval( val ); }
    if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
    if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
    if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
    if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
    if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
    if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
    if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
    if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
    if( strcmp( key , "Bizz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); }
    if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
    if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
    if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
    if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
    if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); }
    if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); }
    if( strcmp( key , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishLic] = strval( val ); }
    if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
    if( strcmp( key , "BikeLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBikeLic] = strval( val ); }
    if( strcmp( key , "LKWLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLKWLic] = strval( val ); }
    if( strcmp( key , "LSPass" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLSPass] = strval( val ); }
    if( strcmp( key , "BSPass" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBSPass] = strval( val ); }
    if( strcmp( key , "Gun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun1] = strval( val ); }
    if( strcmp( key , "Gun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun2] = strval( val ); }
    if( strcmp( key , "Gun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun3] = strval( val ); }
    if( strcmp( key , "Gun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun4] = strval( val ); }
    if( strcmp( key , "Ammo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo1] = strval( val ); }
    if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
    if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
    if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); }
    if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = strval( val ); }
    if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
    if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); }
    if( strcmp( key , "Wins" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWins] = strval( val ); }
    if( strcmp( key , "Loses" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLoses] = strval( val ); }
    if( strcmp( key , "AlcoholPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoholPerk] = strval( val ); }
    if( strcmp( key , "DrugPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugPerk] = strval( val ); }
    if( strcmp( key , "MiserPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMiserPerk] = strval( val ); }
    if( strcmp( key , "PainPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPainPerk] = strval( val ); }
    if( strcmp( key , "TraderPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTraderPerk] = strval( val ); }
    if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
    if( strcmp( key , "Mission" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMissionNr] = strval( val ); }
    if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
    if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdjustable] = strval( val ); }
    if( strcmp( key , "Fuel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFuel] = strval( val ); }
    if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarried] = strval( val ); }
    if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); }
    if( strcmp( key , "SpawnChange" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpawnChange] = strval( val ); }
    if( strcmp( key , "firstlog" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pfirstlog] = strval( val ); }
    if( strcmp( key , "Wanted" , true ) == 0 ) { val = ini_GetValue( Data ); WantedLevel[playerid] = strval( val ); }
    if( strcmp( key , "Locator" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocator] = strval( val ); }
    if( strcmp( key , "Spielzeit" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpielzeit] = strval( val ); }
    if( strcmp( key , "Wanted" , true ) == 0 ) { val = ini_GetValue( Data ); WantedLevel[playerid] = strval( val ); }
    if( strcmp( key , "Fraktionskin" , true ) == 0 ) { val = ini_GetValue( Data ); ChosenSkin[playerid] = strval( val ); }
    if( strcmp( key , "OnDuty" , true ) == 0 ) { val = ini_GetValue( Data ); OnDuty[playerid] = strval( val ); }
    if( strcmp( key , "GWD" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGWD] = strval( val ); }
    if( strcmp( key , "Fraktionssperre" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFrakSperre] = strval( val ); }
    if( strcmp( key , "ReportBlock" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReportBlock] = strval( val ); }
    if( strcmp( key , "Zig" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pZig] = strval( val ); }
    if( strcmp( key , "ZigSucht" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pZigSucht] = strval( val ); }
    if( strcmp( key , "eLemenT Navi" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pnavy] = strval( val ); }
    if( strcmp( key , "Perso" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOwnPerso] = strval( val ); }
    if( strcmp( key , "Locked" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocked] = strval( val ); }
    if( strcmp( key , "IstTot" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTot] = strval( val ); }
    if( strcmp( key , "Ban" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBan] = strval( val ); }
    if( strcmp( key , "LSD", true ) == 0 ) { val = ini_GetValue (Data); PlayerInfo[playerid][pLSD] = strval(val); }
    if( strcmp( key , "Kokain", true ) == 0 ) { val = ini_GetValue (Data); PlayerInfo[playerid][pKokain] = strval(val); }
    if( strcmp( key , "Heroin", true ) == 0 ) { val = ini_GetValue (Data); PlayerInfo[playerid][pHeroin] = strval(val); }
    }//end while
    fclose(UserFile);//close the file after everything has been read in the while
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Das Passwort ist nicht korrekt! Bitte gib nun dein richtiges Passwort ein:","Login","Abbrechen");
    //fclose(UserFile);
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 1)
    {
    SendClientMessage(playerid,COLOR_GREEN,"Falsches Passwort! [1/4]");
    }
    if(gPlayerLogTries[playerid] == 2)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"Falsches Passwort! [2/4]");
    }
    if(gPlayerLogTries[playerid] == 3)
    {
    SendClientMessage(playerid,TEAM_ORANGE_COLOR,"Falsches Passwort! [3/4]");
    }
    if(gPlayerLogTries[playerid] == 4)
    {
    SendClientMessage(playerid,COLOR_RED,"Falsches Passwort! [4/4]");
    Ban(playerid);
    }
    return 1;
    }

    SetPlayerWantedLevel(playerid,WantedLevel[playerid]/10);


    PlayerInfo[playerid][pAdjustable] = 0;
    ResetPlayerMoney(playerid);
    ConsumingMoney[playerid] = 1;
    GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
    CurrentMoney[playerid] = PlayerInfo[playerid][pCash];

    if(PlayerInfo[playerid][pReg] == 0)
    {
    PlayerInfo[playerid][pLevel] = 1;
    PlayerInfo[playerid][pSHealth] = 0.0;
    PlayerInfo[playerid][pHealth] = 50.0;
    //PlayerInfo[playerid][pPos_x] = 2246.6;
    //PlayerInfo[playerid][pPos_y] = -1161.9;
    //PlayerInfo[playerid][pPos_z] = 1029.7;
    PlayerInfo[playerid][pInt] = 0;
    PlayerInfo[playerid][pLocal] = 255;
    PlayerInfo[playerid][pTeam] = 3;
    PlayerInfo[playerid][pModel] = 23;
    new randphone = 1000 + random(8999);
    PlayerInfo[playerid][pPnumber] = randphone;
    PlayerInfo[playerid][pPhousekey] = 255;
    PlayerInfo[playerid][pPbiskey] = 255;
    PlayerInfo[playerid][pAccount] = 15000;
    PlayerInfo[playerid][pPnumber] = 0;
    PlayerInfo[playerid][pReg] = 1;
    GivePlayerMoney(playerid, 5000);
    }


    leider ist es zulang ich muss mehrere Post machen

  • Gehört noch zu OnPlayerLogin


    if (PlayerInfo[playerid][pAdmin] == 1)
    {
    TextDrawShowForPlayer(playerid, ReportTextdraw);
    }


    else if (PlayerInfo[playerid][pAdmin] == 2)
    {
    TextDrawShowForPlayer(playerid, ReportTextdraw1);
    }


    else if (PlayerInfo[playerid][pAdmin] == 3)
    {
    TextDrawShowForPlayer(playerid, ReportTextdraw2);
    }


    else if (PlayerInfo[playerid][pAdmin] == 4)
    {
    TextDrawShowForPlayer(playerid, ReportTextdraw3);
    }


    else if (PlayerInfo[playerid][pAdmin] == 1337)
    {
    TextDrawShowForPlayer(playerid, ReportTextdraw4);
    }


    if(IsAFBI(playerid) || IsALSPD(playerid) || IsASFPD(playerid) || IsABundeswehr(playerid) || IsAnAmbulance(playerid))
    {
    if(OnDuty[playerid] == 1)
    {
    ResetPlayerWeapons(playerid);
    SetPlayerColor(playerid,zivicolor);
    SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
    OnDuty[playerid] = 0;
    }
    }


    if(IsATaxi(playerid) || IsAOamt(playerid))
    {
    if(JobDuty[playerid] == 0)
    {
    ResetPlayerWeapons(playerid);
    SetPlayerColor(playerid,zivicolor);
    SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
    JobDuty[playerid] = 0;
    }
    }


    if(PlayerInfo[playerid][pLevel] == -999) //autoban
    {
    Ban(playerid);
    }
    else if(PlayerInfo[playerid][pCK] > 0)
    {
    Kick(playerid);
    }
    format(string2, sizeof(string2), "SERVER: Willkommen %s",playername2);
    SendClientMessage(playerid, COLOR_WHITE,string2);
    printf("%s has logged in.",playername2);
    if (PlayerInfo[playerid][pDonateRank] > 0)
    {
    SendClientMessage(playerid, COLOR_WHITE,"SERVER: Du bist ein Premiumaccountbenutzer.");
    }
    if (PlayerInfo[playerid][pAdmin] > 0)
    {
    new arank[64];
    if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Supporter"; }
    else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Clan Member"; }
    else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Server Admin"; }
    else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Server Manager"; }
    else if(PlayerInfo[playerid][pAdmin] == 1337) { arank = "Server Owner"; }
    else if(PlayerInfo[playerid][pAdmin] == 1338) { arank = "Server Owner"; }


    format(string2, sizeof(string2), "SERVER: Du bist als %s eingeloggt.",arank);
    SendClientMessage(playerid, COLOR_WHITE,string2);
    }
    SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
    if(gTeam[playerid] == 0)
    {
    gTeam[playerid] = 3;
    }
    else
    {
    gTeam[playerid] = PlayerInfo[playerid][pTeam];
    }
    gPlayerLogged[playerid] = 1;
    SpawnPlayer(playerid);
    format(tmp2, sizeof(tmp2), "~w~Willkommen ~n~~y~ %s", playername2);
    DateProp(playerid);
    OnPlayerUpdate(playerid);
    SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
    TogglePlayerSpectating(playerid, 0);
    GameTextForPlayer(playerid, tmp2, 5000, 1);
    SendClientMessage(playerid, COLOR_YELLOW, motd);
    if(PlayerInfo[playerid][pFMember] < 255)
    {
    format(tmp2, sizeof(tmp2), "Familie MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
    SendClientMessage(playerid, COLOR_YELLOW, tmp2);
    }
    if(IsAGangMember(playerid))
    {
    for (new i = 0; i < MAX_TURFS; i++) { GangZoneShowForPlayer(playerid, turfs[ i ][turfID], turfs[ i ][TurfColor]); }
    }
    if(PlayerInfo[playerid][pBan] == 1)
    {
    SendClientMessage(playerid,COLOR_LIGHTRED,"Dein Account wurde von diesem Server verbannt!");
    SendClientMessage(playerid,COLOR_LIGHTRED,"Bei fragen oder anderem melde dich im Forum bei den Administratoren!");
    Kick(playerid);
    }
    }
    return 1;
    }



    public OnPlayerRegister(playerid, password[])
    {
    if(IsPlayerConnected(playerid))
    {
    new string3[32];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), "/Accounts/%s.ini", playername3);
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
    strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
    new var[32];
    format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
    PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
    format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
    format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
    format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
    format(var, 32, "UpgradePunkte=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
    format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
    format(var, 32, "Fraktionssperre=%d\n",PlayerInfo[playerid][pFrakSperre]);fwrite(hFile, var);
    format(var, 32, "Registriert=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
    format(var, 32, "Geschlecht=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
    format(var, 32, "Alter=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
    format(var, 32, "Herkunft=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
    format(var, 32, "CK=%d\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var);
    format(var, 32, "Stummgeschaltet=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
    format(var, 32, "Respekt=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
    format(var, 32, "Geld=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
    format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
    format(var, 32, "Verbrechen=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
    format(var, 32, "Tode=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
    format(var, 32, "Eingesperrt=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
    format(var, 32, "WantedTode=%d\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
    format(var, 32, "Telefonbuch=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
    format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
    format(var, 32, "Fische=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
    format(var, 32, "GrößterFisch=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
    format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
    format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
    format(var, 32, "Kopfgeld=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
    format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
    format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
    format(var, 32, "Materialien=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
    format(var, 32, "Drogen=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
    format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
    format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
    format(var, 32, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
    format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
    format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
    format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
    format(var, 32, "WaffenSkill=%d\n",PlayerInfo[playerid][pWaffenSkill]);fwrite(hFile, var);
    format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
    format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
    format(var, 32, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
    format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
    format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
    format(var, 32, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
    format(var, 32, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
    format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
    format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
    format(var, 32, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
    format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
    format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
    GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
    format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
    format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
    format(var, 32, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
    format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
    format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
    format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
    format(var, 32, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
    format(var, 32, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
    format(var, 32, "Wanted=%d\n",WantedLevel[playerid]);fwrite(hFile, var);
    format(var, 32, "BikeLic=%d\n",PlayerInfo[playerid][pBikeLic]);fwrite(hFile, var);
    format(var, 32, "LKWLic=%d\n",PlayerInfo[playerid][pLKWLic]);fwrite(hFile, var);
    format(var, 32, "Spielzeit=%d\n",PlayerInfo[playerid][pSpielzeit]);fwrite(hFile, var);
    format(var, 32, "eLemenT Navi=%d\n",PlayerInfo[playerid][pnavy]);fwrite(hFile, var);
    format(var, 32, "IstTot=%d\n",PlayerInfo[playerid][pTot]);fwrite(hFile, var);
    format(var, 32, "Ban=%d\n",PlayerInfo[playerid][pBan]);fwrite(hFile, var);
    if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
    {
    PlayerInfo[playerid][pPos_x] = 1684.9;
    PlayerInfo[playerid][pPos_y] = -2244.5;
    PlayerInfo[playerid][pPos_z] = 13.5;
    }
    if(Spectate[playerid] != 255)
    {
    PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
    PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
    PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
    PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
    PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
    }
    format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
    format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
    format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
    format(var, 32, "Autoschein=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
    format(var, 32, "Flugschein=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
    format(var, 32, "Bootschein=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
    format(var, 32, "Angelschein=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
    format(var, 32, "Waffenschein=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
    format(var, 32, "Bikelicense=%d\n",PlayerInfo[playerid][pBikeLic]);fwrite(hFile, var);
    format(var, 32, "LKWlicense=%d\n",PlayerInfo[playerid][pLKWLic]);fwrite(hFile, var);
    format(var, 32, "LSPass=%d\n",PlayerInfo[playerid][pLSPass]);fwrite(hFile, var);
    format(var, 32, "BSPass=%d\n",PlayerInfo[playerid][pBSPass]);fwrite(hFile, var);
    format(var, 32, "Waffe1=%d\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
    format(var, 32, "Waffe2=%d\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
    format(var, 32, "Waffe3=%d\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
    format(var, 32, "Waffe4=%d\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
    format(var, 32, "Ammo1=%d\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
    format(var, 32, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
    format(var, 32, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
    format(var, 32, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
    format(var, 32, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
    format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
    format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
    format(var, 32, "Siege=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
    format(var, 32, "Niederlagen=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
    format(var, 32, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
    format(var, 32, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
    format(var, 32, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
    format(var, 32, "PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
    format(var, 32, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
    format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
    format(var, 32, "Mission=%d\n",PlayerInfo[playerid][pMissionNr]);fwrite(hFile, var);
    format(var, 32, "Warnungen=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
    format(var, 32, "Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
    format(var, 32, "Tank=%d\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
    format(var, 32, "Verheiratet=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
    format(var, 32, "Verheiratetmit=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
    format(var, 32, "SpawnChange=%d\n",PlayerInfo[playerid][pSpawnChange]);fwrite(hFile, var);
    format(var, 32, "firstlog=%d\n",PlayerInfo[playerid][pfirstlog]);fwrite(hFile, var);
    format(var, 32, "Wanted=%d\n",WantedLevel[playerid]);fwrite(hFile, var);
    format(var, 32, "Fraktionskin=%d\n",ChosenSkin[playerid]);fwrite(hFile, var);
    format(var, 32, "OnDuty=%d\n",OnDuty[playerid]);fwrite(hFile, var);
    format(var, 32, "GWD=%d\n",PlayerInfo[playerid][pGWD]);fwrite(hFile, var);
    format(var, 32, "FrakSperre=%d\n",PlayerInfo[playerid][pFrakSperre]);fwrite(hFile, var);
    format(var, 32, "ReportBlock=%d\n",PlayerInfo[playerid][pReportBlock]);fwrite(hFile, var);
    format(var, 32, "Zig=%d\n",PlayerInfo[playerid][pZig]);fwrite(hFile, var);
    format(var, 32, "ZigSucht=%d\n",PlayerInfo[playerid][pZigSucht]);fwrite(hFile, var);
    format(var, 32, "Perso=%d\n",PlayerInfo[playerid][pOwnPerso]);fwrite(hFile, var);
    fclose(hFile);
    SendClientMessage(playerid, COLOR_WHITE, "Du hast dich erfolgreich registriert.");
    SendClientMessage(playerid, COLOR_WHITE, "Du kannst dich jetzt einloggen");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Bitte logge dich in deinen Account ein!","Login","Abbrechen");
    }
    }
    return 1;
    }


    Aso und ich habe gemerkt wenn ich mich regestriere... ist meine ini nicht 0 KB erst wenn ich dann disconnecte

  • public OnPlayerUpdate(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid])
    {
    new string3[256];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), "/Accounts/%s.ini", playername3);
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
    PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
    format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
    format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
    format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
    format(var, 32, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
    format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
    format(var, 32, "Fraktionssperre=%d\n",PlayerInfo[playerid][pFrakSperre]);fwrite(hFile, var);
    format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
    format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
    format(var, 32, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
    format(var, 32, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
    format(var, 32, "CK=%d\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var);
    format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
    format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
    format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
    format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
    format(var, 32, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
    format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
    format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
    format(var, 32, "WantedDeaths=%d\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
    format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
    format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
    format(var, 32, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
    format(var, 32, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
    format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
    format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
    format(var, 32, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
    format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
    format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
    format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
    format(var, 32, "Drugs=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
    format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
    format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
    format(var, 32, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
    format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
    format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
    format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
    format(var, 32, "WaffenSkill=%d\n",PlayerInfo[playerid][pWaffenSkill]);fwrite(hFile, var);
    format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
    format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
    format(var, 32, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
    format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
    format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
    format(var, 32, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
    format(var, 32, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
    format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
    format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
    format(var, 32, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
    format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
    format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
    GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
    format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
    format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
    format(var, 32, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
    format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
    format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
    format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
    format(var, 32, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
    format(var, 32, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
    format(var, 32, "SpawnChange=%d\n",PlayerInfo[playerid][pSpawnChange]);fwrite(hFile, var);
    format(var, 32, "firstlog=%d\n",PlayerInfo[playerid][pfirstlog]);fwrite(hFile, var);
    format(var, 32, "Locator=%d\n",PlayerInfo[playerid][pLocator]);fwrite(hFile, var);
    format(var, 32, "eLemenT Navi=%d\n",PlayerInfo[playerid][pnavy]);fwrite(hFile, var);
    format(var, 32, "IstTot=%d\n",PlayerInfo[playerid][pTot]);fwrite(hFile, var);
    format(var, 32, "Ban=%d\n",PlayerInfo[playerid][pBan]);fwrite(hFile, var);
    if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
    {
    PlayerInfo[playerid][pPos_x] = 1684.9;
    PlayerInfo[playerid][pPos_y] = -2244.5;
    PlayerInfo[playerid][pPos_z] = 13.5;
    }
    if(Spectate[playerid] != 255)
    {
    PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
    PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
    PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
    PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
    PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
    }

    format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
    format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
    format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
    format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
    format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
    format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
    format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
    format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
    format(var, 32, "BikeLic=%d\n",PlayerInfo[playerid][pBikeLic]);fwrite(hFile, var);
    format(var, 32, "LKWLic=%d\n",PlayerInfo[playerid][pLKWLic]);fwrite(hFile, var);
    format(var, 32, "LSPass=%d\n",PlayerInfo[playerid][pLSPass]);fwrite(hFile, var);
    format(var, 32, "BSPass=%d\n",PlayerInfo[playerid][pBSPass]);fwrite(hFile, var);
    format(var, 32, "Gun1=%d\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
    format(var, 32, "Gun2=%d\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
    format(var, 32, "Gun3=%d\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
    format(var, 32, "Gun4=%d\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
    format(var, 32, "Ammo1=%d\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
    format(var, 32, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
    format(var, 32, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
    format(var, 32, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
    format(var, 32, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
    format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
    format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
    format(var, 32, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
    format(var, 32, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
    format(var, 32, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
    format(var, 32, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
    format(var, 32, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
    format(var, 32, "PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
    format(var, 32, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
    format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
    format(var, 32, "Mission=%d\n",PlayerInfo[playerid][pMissionNr]);fwrite(hFile, var);
    format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
    format(var, 32, "Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
    format(var, 32, "Fuel=%d\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
    format(var, 32, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
    format(var, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
    format(var, 32, "SpawnChange=%d\n",PlayerInfo[playerid][pSpawnChange]);fwrite(hFile, var);
    format(var, 32, "firstlog=%d\n",PlayerInfo[playerid][pfirstlog]);fwrite(hFile, var);
    format(var, 32, "Spielzeit=%d\n",PlayerInfo[playerid][pSpielzeit]);fwrite(hFile, var);
    format(var, 32, "Wanted=%d\n",WantedLevel[playerid]);fwrite(hFile, var);
    format(var, 32, "Fraktionskin=%d\n",ChosenSkin[playerid]);fwrite(hFile, var);
    format(var, 32, "OnDuty=%d\n",OnDuty[playerid]);fwrite(hFile, var);
    format(var, 32, "GWD=%d\n",PlayerInfo[playerid][pGWD]);fwrite(hFile, var);
    format(var, 32, "FrakSperre=%d\n",PlayerInfo[playerid][pFrakSperre]);fwrite(hFile, var);
    format(var, 32, "ReportBlock=%d\n",PlayerInfo[playerid][pReportBlock]);fwrite(hFile, var);
    format(var, 32, "Zig=%d\n",PlayerInfo[playerid][pZig]);fwrite(hFile, var);
    format(var, 32, "ZigSucht=%d\n",PlayerInfo[playerid][pZigSucht]);fwrite(hFile, var);
    format(var, 32, "Perso=%d\n",PlayerInfo[playerid][pOwnPerso]);fwrite(hFile, var);
    format(var, 32, "Locked=%d\n",PlayerInfo[playerid][pLocked]);fwrite(hFile, var);
    format(var, 32, "LSD=%d\n", PlayerInfo[playerid][pLSD]); fwrite(hFile, var);
    format(var, 32, "Kokain=%d\n", PlayerInfo[playerid][pKokain]); fwrite(hFile, var);
    format(var, 32, "Heroin=%d\n", PlayerInfo[playerid][pHeroin]); fwrite(hFile, var);
    fclose(hFile);
    }
    }
    }
    return 1;
    }

  • public OnPlayerDisconnect(playerid, reason)
    {
    new string[256];
    format(string, sizeof(string), "DELETE FROM frage WHERE playerid = '%d'", playerid);
    db_query(reportdb, string);
    format(string, sizeof(string), "DELETE FROM regel WHERE playerid = '%d'", playerid);
    db_query(reportdb, string);
    format(string, sizeof(string), "DELETE FROM cheater WHERE playerid = '%d'", playerid);
    db_query(reportdb, string);
    format(string, sizeof(string), "DELETE FROM account WHERE playerid = '%d'", playerid);
    db_query(reportdb, string);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(GetPVarInt(i, "reportchat")==GetPVarInt(playerid, "reportchat"))
    {
    if(i!=playerid)
    {
    SetPVarInt(i, "reportchat", 0);
    SetPVarInt(playerid, "reportchat", 0);
    }
    }
    }
    //Visen
    lsvisum[playerid] = 0;
    bsvisum[playerid] = 0;
    //Visen


    //Nevada Interior
    IsInNev[playerid] = 0;

    //Anti DM
    Warnungen[playerid] = 0;
    JailWarnungen[playerid] = 0;
    PrisonWarnungen[playerid] = 0;
    //Anti DM

    RemovePlayerAttachedObject(playerid, 1);
    PlayerInfo[playerid][pPersoStop] = 0;
    AllowPerso[playerid] = 0;

    //Rentcarsystem
    DestroyVehicle(PlayerCar[playerid]);
    PlayerCarID[playerid]=999;
    PlayerCar[playerid]=0;
    PlayerCount[playerid]=RentMinutes;
    PlayerCount[playerid] = 0;
    ChoosenColor[playerid]=0;
    RentCarLocked[playerid]=true;
    RentedCar[playerid]=false;
    RentedCars-=1;
    //Rentcarsystem

    //SWAT Abseilen
    TextDrawHideForPlayer(playerid,blind);


    if(PlaysLSPDDM[playerid] == 1)
    {
    LSPDDMPlayers--;
    LSPDDeathmatch();
    }


    //-----------------------------------------------------[Autohaus]-------------------------------------------
    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.car", playername);
    new File: CarFile = fopen(dateiname, io_write);
    format(var, 256, "AH_Typ=%i\n", Carlist[playerid][Typ]); fwrite(CarFile, var);
    format(var, 256, "AH_X=%f\n", Carlist[playerid][pos_x]); fwrite(CarFile, var);
    format(var, 256, "AH_Y=%f\n", Carlist[playerid][pos_y]); fwrite(CarFile, var);
    format(var, 256, "AH_Z=%f\n", Carlist[playerid][pos_z]); fwrite(CarFile, var);
    format(var, 256, "AH_Rot=%f\n", Carlist[playerid][z_angle]); fwrite(CarFile, var);
    format(var, 256, "AH_Status=%i\n", Carlist[playerid][Status]); fwrite(CarFile, var);
    format(var, 256, "AH_Lock=%i\n", Carlist[playerid][Lock]); fwrite(CarFile, var);
    format(var, 256, "AH_Paintjob=%i\n", Carlist[playerid][Paintjob]); fwrite(CarFile, var);
    format(var, 256, "AH_Farbe1=%i\n", Carlist[playerid][Farbe1]); fwrite(CarFile, var);
    format(var, 256, "AH_Farbe2=%i\n", Carlist[playerid][Farbe2]); fwrite(CarFile, var);
    format(var, 256, "AH_mod1=%i\n", Carlist[playerid][mod1]); fwrite(CarFile, var);
    format(var, 256, "AH_mod2=%i\n", Carlist[playerid][mod2]); fwrite(CarFile, var);
    format(var, 256, "AH_mod3=%i\n", Carlist[playerid][mod3]); fwrite(CarFile, var);
    format(var, 256, "AH_mod4=%i\n", Carlist[playerid][mod4]); fwrite(CarFile, var);
    format(var, 256, "AH_mod5=%i\n", Carlist[playerid][mod5]); fwrite(CarFile, var);
    format(var, 256, "AH_mod6=%i\n", Carlist[playerid][mod6]); fwrite(CarFile, var);
    format(var, 256, "AH_mod7=%i\n", Carlist[playerid][mod7]); fwrite(CarFile, var);
    format(var, 256, "AH_mod8=%i\n", Carlist[playerid][mod8]); fwrite(CarFile, var);
    format(var, 256, "AH_mod9=%i\n", Carlist[playerid][mod9]); fwrite(CarFile, var);
    format(var, 256, "AH_mod10=%i\n", Carlist[playerid][mod10]); fwrite(CarFile, var);
    format(var, 256, "AH_mod11=%i\n", Carlist[playerid][mod11]); fwrite(CarFile, var);
    format(var, 256, "AH_mod12=%i\n", Carlist[playerid][mod12]); fwrite(CarFile, var);
    format(var, 256, "AH_mod13=%i\n", Carlist[playerid][mod13]); fwrite(CarFile, var);
    format(var, 256, "AH_mod14=%i\n", Carlist[playerid][mod14]); fwrite(CarFile, var);
    format(var, 256, "AH_mod15=%i\n", Carlist[playerid][mod15]); fwrite(CarFile, var);
    format(var, 256, "AH_mod16=%i\n", Carlist[playerid][mod16]); fwrite(CarFile, var);
    format(var, 256, "AH_mod17=%i\n", Carlist[playerid][mod17]); fwrite(CarFile, var);
    fclose(CarFile);
    if(Carlist[playerid][Carid]!=-1)
    {
    SetVehicleParamsForAll(Carlist[playerid][Carid],0,0);
    DestroyVehicle(Carlist[playerid][Carid]);
    Carlist[playerid][Carid]=-1;
    }
    if (Spectating[playerid][0]!=-1)
    {
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    }

    if(IsAFBI(playerid) || IsALSPD(playerid) || IsASFPD(playerid) || IsABundeswehr(playerid) || IsAnAmbulance(playerid))
    {
    if(OnDuty[playerid] == 0)
    {
    ResetPlayerWeapons(playerid);
    SetPlayerColor(playerid,zivicolor);
    }
    }

    if(IsATaxi(playerid) || IsAOamt(playerid))
    {
    if(JobDuty[playerid] == 0)
    {
    ResetPlayerWeapons(playerid);
    SetPlayerColor(playerid,zivicolor);
    }
    }


    //-----------------------------------------------------[Autohaus]-------------------------------------------
    Delete3DTextLabel(Admins[playerid]);
    Delete3DTextLabel(Duty[playerid]);
    //Delete3DTextLabel(MGS[playerid]);
    Delete3DTextLabel(AFK[playerid]);
    DestroyPickup(TotenKopf[playerid][0]);
    gActivePlayers[playerid]--;
    OnPlayerUpdate(playerid);
    numplayers--;
    PlayerInfo[playerid][pAdjustable] = 1;
    new Grund[256];
    new name[24];
    //new wanteds;
    new disconnectstring[256];
    GetPlayerName(playerid,name,24);
    switch(reason) {
    case 0: Grund = "Timeout/Task Manager";
    case 1: Grund = "Ausgeloggt";
    case 2: Grund = "Kick/Ban"; }
    format(disconnectstring,256,"* %s hat den Server verlassen [%s]",name,Grund);
    ProxDetector(30.0, playerid, disconnectstring, COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
    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~Taxi anRufer~n~~r~Hat den Server verlassen", 5000, 1);
    TaxiCallTime[i] = 0;
    DisablePlayerCheckpoint(i);
    }
    }
    else if(BusAccepted[i] < 999)
    {
    if(BusAccepted[i] == playerid)
    {
    BusAccepted[i] = 999;
    GameTextForPlayer(i, "~w~Bus anRufer~n~~r~Hat den Server verlassen", 5000, 1);
    BusCallTime[i] = 0;
    DisablePlayerCheckpoint(i);
    }
    }
    }
    }
    if(GettingCK[playerid] < 999)
    {
    if(IsPlayerConnected(GettingCK[playerid]))
    {
    SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Dein Killer hat den Server verlassen, probier es später nochmal.");
    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 hat verlassen~n~~g~Du hast %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 Hit hat den Server verlassen.");
    GoChase[GetChased[playerid]] = 999;
    }
    }
    }
    if(PlayerPaintballing[playerid] != 0)
    {
    PaintballPlayers --;
    }
    if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
    {
    KartingPlayers --;
    }
    if(PlayersChannel[playerid] < 999)
    {
    IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
    }
    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~Das Match wurde abgebrochen", 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~Das Match wurde abgebrochen", 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][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
    {
    if(JobDuty[playerid] == 1) { Medics -= 1; }
    }
    else if(PlayerInfo[playerid][pMember] == 17||PlayerInfo[playerid][pLeader] == 17)
    {
    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
    }
    else if(PlayerInfo[playerid][pMember] == 18||PlayerInfo[playerid][pLeader] == 18)
    {
    if(OnDuty[playerid] == 1) { Feuerwehrs -= 1; }
    }
    /*if (PlayerInfo[playerid][pRoadblock] != 0)
    {
    RemoveRoadblock(playerid);
    }*/
    return 1;

    }

  • Okay ich mache das jetzt mal


    so alles auf OnPlayerSave anstatt OnPlayerUpdate



    //edit
    entschuldige das ich noch mal das editiere aber ne frage.


    Könnt ihr mir dann vllt. noch mehr fehler sagen? Wär ziemlich nett

    Einmal editiert, zuletzt von Rocc0w ()

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen