GF auf mySQL umschreiben

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
  • Ich bin momenan ein GF auf MYSQL am umschreiben......
    ich habe da allerdings so einige probleme das so sachen wie geld usw. nicht gespeichert/geladen werden und andere sachen wie Password und Level aber richtig geladen werden


    hier mal das ganze login system:


    public OnPlayerLogin(playerid,password[])
    {
    new tmp2[256];
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    new PassData[256];
    new keytmp[256], valtmp[256];


    /*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(password, (mysql_ReturnPasswort(playername2)), false))
    {
    GetPlayerName(playerid, PlayerInfo[playerid][pUserName], MAX_PLAYER_NAME); //Wir Speichern den Namen des Spielers in der Variable [i]PlayerInfo[playerid][pName][/i]
    // PlayerInfo[playerid][pKey] = mysql_GetInt("accounts", "Passwort", "Name", PlayerInfo[playerid][pUserName]); //Wir holen uns den wert der unter "Level" eingetragen ist und Speichern ihn in unserer Variable.
    PlayerInfo[playerid][pLevel] = mysql_GetInt("accounts", "Level", "Name", PlayerInfo[playerid][pUserName]); //Wir holen uns den wert der unter "Geld" eingetragen ist und Speichern ihn in unserer Variable.
    PlayerInfo[playerid][pAdmin] = mysql_GetInt("accounts", "Admin", "Name", PlayerInfo[playerid][pUserName]); //Wir holen uns den wert der unter "Kills" eingetragen ist und Speichern ihn in unserer Variable.
    PlayerInfo[playerid][pSupporter] = mysql_GetInt("accounts", "Supporter", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pDonateRank] = mysql_GetInt("accounts", "DonateRank", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][gPupgrade] = mysql_GetInt("accounts", "UpgradePoints", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pConnectTime] = mysql_GetInt("accounts", "ConnectedTime", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pReg] = mysql_GetInt("accounts", "Registered", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pSex] = mysql_GetInt("accounts", "Sex", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pAge] = mysql_GetInt("accounts", "Age", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pOrigin] = mysql_GetInt("accounts", "Origin", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pCK] = mysql_GetInt("accounts", "CK", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMuted] = mysql_GetInt("accounts", "Muted", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pExp] = mysql_GetInt("accounts", "Respect", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pCash] = mysql_GetInt("accounts", "Money", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pAccount] = mysql_GetInt("accounts", "Bank", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pCrimes] = mysql_GetInt("accounts", "Crimes", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pKills] = mysql_GetInt("accounts", "Kills", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pDeaths] = mysql_GetInt("accounts", "Deaths", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pArrested] = mysql_GetInt("accounts", "Arrested", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pWantedDeaths] = mysql_GetInt("accounts", "WantedDeaths", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPhoneBook] = mysql_GetInt("accounts", "Phonebook", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pLottoNr] = mysql_GetInt("accounts", "LottoNr", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pFishes] = mysql_GetInt("accounts", "Fishes", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pBiggestFish] = mysql_GetInt("accounts", "BiggestFish", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pJob] = mysql_GetInt("accounts", "Job", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPayCheck] = mysql_GetInt("accounts", "Paycheck", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pHeadValue] = mysql_GetInt("accounts", "HeadValue", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pJailed] = mysql_GetInt("accounts", "Jailed", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pJailTime] = mysql_GetInt("accounts", "JailTime", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMats] = mysql_GetInt("accounts", "Materials", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pDrugs] = mysql_GetInt("accounts", "Drugs", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pLeader] = mysql_GetInt("accounts", "Leader", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMember] = mysql_GetInt("accounts", "Member", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pFMember] = mysql_GetInt("accounts", "FMember", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pRank] = mysql_GetInt("accounts", "Rank", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pChar] = mysql_GetInt("accounts", "Char", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pContractTime] = mysql_GetInt("accounts", "ContractTime", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pDetSkill] = mysql_GetInt("accounts", "DetSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pSexSkill] = mysql_GetInt("accounts", "SexSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pBoxSkill] = mysql_GetInt("accounts", "BoxSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pLawSkill] = mysql_GetInt("accounts", "LawSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMechSkill] = mysql_GetInt("accounts", "MechSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pJackSkill] = mysql_GetInt("accounts", "JackSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pCarSkill] = mysql_GetInt("accounts", "CarSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pNewsSkill] = mysql_GetInt("accounts", "NewsSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pDrugsSkill] = mysql_GetInt("accounts", "DrugsSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pCookSkill] = mysql_GetInt("accounts", "CookSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pFishSkill] = mysql_GetInt("accounts", "FishSkill", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][Float:pHealth] = mysql_GetInt("accounts", "pSHealth", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][Float:pSHealth] = mysql_GetInt("accounts", "pHealth", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pInt] = mysql_GetInt("accounts", "Int", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pLocal] = mysql_GetInt("accounts", "Local", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pTeam] = mysql_GetInt("accounts", "Team", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pModel] = mysql_GetInt("accounts", "Model", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPnumber] = mysql_GetInt("accounts", "PhoneNr", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPhousekey] = mysql_GetInt("accounts", "House", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPbiskey] = mysql_GetInt("accounts", "Bizz", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pHandyGeld] = mysql_GetInt("accounts", "HandyGeld", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pHandyVer] = mysql_GetInt("accounts", "HandyVer", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][Float:pPos_x] = mysql_GetInt("accounts", "Pos_x", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][Float:pPos_y] = mysql_GetInt("accounts", "Pos_x", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][Float:pPos_z] = mysql_GetInt("accounts", "Pos_z", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pCarLic] = mysql_GetInt("accounts", "CarLic", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pNewLic] = mysql_GetInt("accounts", "NewLic", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pFlyLic] = mysql_GetInt("accounts", "FlyLic", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pBoatLic] = mysql_GetInt("accounts", "BoatLic", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pFishLic] = mysql_GetInt("accounts", "FishLic", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pGunLic] = mysql_GetInt("accounts", "GunLic", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pLKWLic] = mysql_GetInt("accounts", "LKWLic", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMotoLic] = mysql_GetInt("accounts", "MotoLic", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pZig] = mysql_GetInt("accounts", "Zig", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pZigSucht] = mysql_GetInt("accounts", "ZigSucht", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pSprengstoff] = mysql_GetInt("accounts", "Sprengstoff", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pGun1] = mysql_GetInt("accounts", "Gun1", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pGun2] = mysql_GetInt("accounts", "Gun2", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pGun3] = mysql_GetInt("accounts", "Gun3", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pGun4] = mysql_GetInt("accounts", "Gun4", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pAmmo1] = mysql_GetInt("accounts", "Ammo1", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pAmmo2] = mysql_GetInt("accounts", "Ammo2", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pAmmo3] = mysql_GetInt("accounts", "Ammo3", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pAmmo4] = mysql_GetInt("accounts", "Ammo4", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pCarTime] = mysql_GetInt("accounts", "CarTime", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPayDay] = mysql_GetInt("accounts", "PayDay", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPayDayHad] = mysql_GetInt("accounts", "PayDayHad", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pCDPlayer] = mysql_GetInt("accounts", "CDPlayer", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pWins] = mysql_GetInt("accounts", "Wins", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pLoses] = mysql_GetInt("accounts", "Loses", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pAlcoholPerk] = mysql_GetInt("accounts", "AlcoholPerk", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pDrugPerk] = mysql_GetInt("accounts", "DrugPerk", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMiserPerk] = mysql_GetInt("accounts", "MiserPerk", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPainPerk] = mysql_GetInt("accounts", "PainPerk", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pTraderPerk] = mysql_GetInt("accounts", "TraderPerk", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pTut] = mysql_GetInt("accounts", "Tutorial", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pWarns] = mysql_GetInt("accounts", "Warnings", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pAdjustable] = mysql_GetInt("accounts", "Adjustable", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pFuel] = mysql_GetInt("accounts", "Fuel", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMarried] = mysql_GetInt("accounts", "Married", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMarriedTo] = mysql_GetInt("accounts", "MarriedTo", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pRoadblock] = mysql_GetInt("accounts", "Roadblock", "Name", PlayerInfo[playerid][pUserName]);
    SpawnChange[playerid] = mysql_GetInt("accounts", "SpawnChange", "Name", PlayerInfo[playerid][pUserName]);
    WantedLevel[playerid] = mysql_GetInt("accounts", "WantedLevel", "Name", PlayerInfo[playerid][pUserName]);
    WantedPoints[playerid] = mysql_GetInt("accounts", "WantedPoints", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pPlayMinutes] = mysql_GetInt("accounts", "PlayMinutes", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pGesamtMinutes] = mysql_GetInt("accounts", "GesamtMinutes", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMinutesSinceLogin] = mysql_GetInt("accounts", "MinutesSinceLogin", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pMinutesSinceAn] = mysql_GetInt("accounts", "MinutesSinceAn", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pSFPASS] = mysql_GetInt("accounts", "SFPASS", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pLVPASS] = mysql_GetInt("accounts", "LVPASS", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pHandyGeld] = mysql_GetInt("accounts", "HandyGeld", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pHandyVer] = mysql_GetInt("accounts", "HandyVer", "Name", PlayerInfo[playerid][pUserName]);
    OfflineFlucht[playerid] = mysql_GetInt("accounts", "Offflucht", "Name", PlayerInfo[playerid][pUserName]);
    Knast[playerid] = mysql_GetInt("accounts", "Knast", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pHandyID] = mysql_GetInt("accounts", "Handy", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pUhrID] = mysql_GetInt("accounts", "Uhr", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pTot] = mysql_GetInt("accounts", "pTot", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pTx] = mysql_GetInt("accounts", "pTx", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pTy] = mysql_GetInt("accounts", "pTz", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pTz] = mysql_GetInt("accounts", "pTy", "Name", PlayerInfo[playerid][pUserName]);
    KnastTime[playerid] = mysql_GetInt("accounts", "KnastTime", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pOwnPerso] = mysql_GetInt("accounts", "Perso", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pFrakSperre] = mysql_GetInt("accounts", "FrakSperre", "Name", PlayerInfo[playerid][pUserName]);
    PlayerInfo[playerid][pGebannt] = mysql_GetInt("accounts", "Gebannt", "Name", PlayerInfo[playerid][pUserName]);
    }


  • 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);
    SendClientMessage(playerid, COLOR_RED, " Falsches Passwort");
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
    return 1;
    }
    PlayerInfo[playerid][pAdjustable] = 0;
    ResetPlayerMoney(playerid);
    ConsumingMoney[playerid] = 1;
    GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
    CurrentMoney[playerid] = PlayerInfo[playerid][pCash];


    /*if(WantedPoints[playerid] == 2) { if(WantedLevel[playerid] != 1) { WantedLevel[playerid] = 1; } }
    else if(WantedPoints[playerid] >= 4 && WantedPoints[playerid] <= 5) { if(WantedLevel[playerid] != 2) { WantedLevel[playerid] = 2; } }
    else if(WantedPoints[playerid] >= 6 && WantedPoints[playerid] <= 7) { if(WantedLevel[playerid] != 3) { WantedLevel[playerid] = 3; } }
    else if(WantedPoints[playerid] >= 8 && WantedPoints[playerid] <= 9) { if(WantedLevel[playerid] != 4) { WantedLevel[playerid] = 4; } }
    else if(WantedPoints[playerid] >= 10 && WantedPoints[playerid] <= 11) { if(WantedLevel[playerid] != 5) { WantedLevel[playerid] = 5; } }
    else if(WantedPoints[playerid] >= 12 && WantedPoints[playerid] <= 13) { if(WantedLevel[playerid] != 6) { WantedLevel[playerid] = 6; } }
    else if(WantedPoints[playerid] >= 14) { if(WantedLevel[playerid] != 10) { WantedLevel[playerid] = 10; } }
    SetPlayerWantedLevel(playerid,WantedLevel[playerid]);
    */


    if(PlayerInfo[playerid][pReg] == 0)
    {
    PlayerInfo[playerid][pLevel] = 1;
    PlayerInfo[playerid][pSHealth] = 0.0;
    PlayerInfo[playerid][pHealth] = 99.0;
    PlayerInfo[playerid][pPos_x] = 2246.6;
    PlayerInfo[playerid][pPos_y] = -1161.9;
    PlayerInfo[playerid][pPos_z] = 1029.7;
    PlayerInfo[playerid][pInt] = 15;
    PlayerInfo[playerid][pLocal] = 255;
    PlayerInfo[playerid][pTeam] = 3;
    PlayerInfo[playerid][pModel] = 101; //Noobskin
    PlayerInfo[playerid][pPhousekey] = 255;
    PlayerInfo[playerid][pPbiskey] = 255;
    PlayerInfo[playerid][pAccount] = 0;
    PlayerInfo[playerid][pReg] = 1;
    GivePlayerMoney(playerid, 50000); //Noobmoney
    }
    if(PlayerInfo[playerid][pGebannt] == 1) //autoban
    {
    format(string2,sizeof(string2)," %s versucht mit seinem gebannten Account online zu kommen und wurde gekickt!",playername2);
    ABroadCast(COLOR_LIGHTRED,string2,1);
    SendClientMessage(playerid,COLOR_LIGHTGREEN," Dein Account ist gebannt! Mach dir mal Gedanken warum...");
    Kick(playerid);
    return 1;
    }/*
    if(PlayerInfo[playerid][pAdmin] > 1460) //autoban
    {
    format(string2,sizeof(string2)," %s hat versucht, sich mit dem Admin Level %d einzuloggen und wurde von ]BDC[bl00dy_rAiN's schlauem Anti-Hack System Autogebannt !",playername2, PlayerInfo[playerid][pAdmin]);
    ABroadCast(COLOR_LIGHTRED,string2,1);
    SendClientMessage(playerid,COLOR_LIGHTGREEN," Du verdammter Hurensohn verpiss dich von unserem Server mit deinen scheiß Hacks, mach das bei [LoH] !!!!!!!!!!");
    BanEx(playerid, "Scheiß Hacker Hurensohn Level ueber dem höchsten !");
    return 1;
    }*/
    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 Premium Nutzer.");
    }
    if (PlayerInfo[playerid][pAdmin] > 0)
    {
    format(string2, sizeof(string2), "Server: Du bist als Level %d Admin eingeloggt.",PlayerInfo[playerid][pAdmin]);
    SendClientMessage(playerid, COLOR_WHITE,string2);
    }
    if(PlayerInfo[playerid][pSupporter] > 0)
    {
    format(string2, sizeof(string2), "Server: Du bist als Level %d Supporter eingeloggt.",PlayerInfo[playerid][pSupporter]);
    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);
    GameTextForPlayer(playerid, tmp2, 5000, 1);
    SendClientMessage(playerid, COLOR_YELLOW, motd);
    PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
    if(PlayerInfo[playerid][pFMember] < 255)
    {
    format(tmp2, sizeof(tmp2), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
    SendClientMessage(playerid, COLOR_YELLOW, tmp2);
    }


    if(OfflineFlucht[playerid] == 1 && WantedLevel[playerid] > 0)
    {
    SendClientMessage(playerid,COLOR_LIGHTRED, "* Du wurdest Eingesperrt weil du Offline-Flucht begangen hast!");
    SendClientMessage(playerid,COLOR_LIGHTRED, "* Pro WantedLevel 5 Minuten + 30 Minuten Strafe!");
    new sendername[MAX_PLAYER_NAME],string[100];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "*[Auto-Jail] %s wurde wegen Offline-Flucht eignesperrt.", sendername);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && IsADChatter(i))
    {
    SendClientMessage(i,COLOR_ALLDEPT,string);
    }
    }
    OfflineFlucht[playerid] = 0;
    ResetPlayerWeapons(playerid);
    new wlevel = WantedLevel[playerid];
    PlayerInfo[playerid][pJailed] = 1;
    PlayerInfo[playerid][pJailTime] = (wlevel*300)+1800;
    SetPlayerInterior(playerid, 3);
    if(LSPDZellen == 0)//zelle1
    {
    SetPlayerPos(playerid,198.0773,161.7927,1003.0300);
    LSPDZellen += 1;
    }
    if(LSPDZellen == 1)//zelle2
    {
    SetPlayerPos(playerid,198.0191,174.8355,1003.0234);
    LSPDZellen += 1;
    }
    if(LSPDZellen == 2)//zelle3
    {
    SetPlayerPos(playerid,193.7850,175.0043,1003.0234);
    LSPDZellen = 0;
    }
    WantedPoints[playerid] = 0;
    SetPlayerWantedLevel(playerid,0);
    WantedLevel[playerid] = 0;
    }
    else if(OfflineFlucht[playerid] == 1 && WantedLevel[playerid] == 0)
    {
    SendClientMessage(playerid,COLOR_LIGHTRED, "* Du wurdest eingesperrt weil du Offline-Flucht begangen hast!");
    new sendername[MAX_PLAYER_NAME],string[100];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "*[Auto-Jail] %s wurde wegen Offline-Flucht eingesperrt.", sendername);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && IsADChatter(i))
    {
    SendClientMessage(i,COLOR_ALLDEPT,string);
    }
    }
    OfflineFlucht[playerid] = 0;
    ResetPlayerWeapons(playerid);
    PlayerInfo[playerid][pJailed] = 1;
    PlayerInfo[playerid][pJailTime] = 300;
    SetPlayerInterior(playerid, 3);
    if(LSPDZellen == 0)//zelle1
    {
    SetPlayerPos(playerid,198.0773,161.7927,1003.0300);
    LSPDZellen += 1;
    }
    if(LSPDZellen == 1)//zelle2
    {
    SetPlayerPos(playerid,198.0191,174.8355,1003.0234);
    LSPDZellen += 1;
    }
    if(LSPDZellen == 2)//zelle3
    {
    SetPlayerPos(playerid,193.7850,175.0043,1003.0234);
    LSPDZellen = 0;
    }
    WantedPoints[playerid] = 0;
    SetPlayerWantedLevel(playerid,0);
    WantedLevel[playerid] = 0;
    }
    else if(OfflineFlucht[playerid] == 2 && WantedLevel[playerid] > 0)
    {
    SendClientMessage(playerid,COLOR_LIGHTRED, "* Du wurdest Eingesperrt weil du Gecuffed einen Crash hattest!");
    SendClientMessage(playerid,COLOR_LIGHTRED, "* Pro WantedLevel 5 Minuten!");
    new sendername[MAX_PLAYER_NAME],string[100];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "*[Auto-Jail] %s wurde wegen Exe-Crash eingesperrt.", sendername);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && IsADChatter(i))
    {
    SendClientMessage(i,COLOR_ALLDEPT,string);
    }
    }
    OfflineFlucht[playerid] = 0;
    ResetPlayerWeapons(playerid);
    new wlevel = WantedLevel[playerid];
    PlayerInfo[playerid][pJailed] = 1;
    PlayerInfo[playerid][pJailTime] = wlevel*300;
    SetPlayerInterior(playerid, 3);
    if(LSPDZellen == 0)//zelle1
    {
    SetPlayerPos(playerid,198.0773,161.7927,1003.0300);
    LSPDZellen += 1;
    }
    if(LSPDZellen == 1)//zelle2
    {
    SetPlayerPos(playerid,198.0191,174.8355,1003.0234);
    LSPDZellen += 1;
    }
    if(LSPDZellen == 2)//zelle3
    {
    SetPlayerPos(playerid,193.7850,175.0043,1003.0234);
    LSPDZellen = 0;
    }
    WantedPoints[playerid] = 0;
    SetPlayerWantedLevel(playerid,0);
    WantedLevel[playerid] = 0;
    }
    new stern = WantedLevel[playerid];
    SetPlayerWantedLevel(playerid,stern);
    WantedPoints[playerid] = stern * 2;
    //3D
    if (PlayerInfo[playerid][pAdmin] == 1 ||PlayerInfo[playerid][pAdmin] == 2 || PlayerInfo[playerid][pAdmin] == 3) // Von dem Adminrang 1-1338 wird das 3D angezeigt
    {
    new GMTEXT1[MAX_PLAYER_NAME];
    if (PlayerInfo[playerid][pSex] == 1)
    GMTEXT1 = "Moderator";
    else if (PlayerInfo[playerid][pSex] == 2)
    GMTEXT1 = "Monderatorin";
    ADMIN1[playerid] = Create3DTextLabel(GMTEXT1,0x779529FF,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(ADMIN1[playerid], playerid, 0.0, 0.0, 0.45);
    }
    else if (PlayerInfo[playerid][pAdmin] == 1337 || PlayerInfo[playerid][pAdmin] == 1337 || PlayerInfo[playerid][pAdmin] == 1337) // Von dem Adminrang 1-1338 wird das 3D angezeigt
    {
    new GMTEXT2[MAX_PLAYER_NAME];
    if (PlayerInfo[playerid][pSex] == 1)
    GMTEXT2 = "Server Scripter";
    else if (PlayerInfo[playerid][pSex] == 2)
    GMTEXT2 = "Server Scripter";
    ADMIN2[playerid] = Create3DTextLabel(GMTEXT2,0x46A7BFFF,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(ADMIN2[playerid], playerid, 0.0, 0.0, 0.45);
    }
    else if (PlayerInfo[playerid][pAdmin] == 1339 || PlayerInfo[playerid][pAdmin] == 1338 || PlayerInfo[playerid][pAdmin] == 1337) // Von dem Adminrang 1-1338 wird das 3D angezeigt
    {
    new GMTEXT3[MAX_PLAYER_NAME];
    if (PlayerInfo[playerid][pSex] == 1)
    GMTEXT3 = "Rechte Hand";
    else if (PlayerInfo[playerid][pSex] == 2)
    GMTEXT3 = "Rechte Hand";
    ADMIN3[playerid] = Create3DTextLabel(GMTEXT3,0xC3BE0EFF,0,0,0,70.5,0);
    Attach3DTextLabelToPlayer(ADMIN3[playerid], playerid, 0.0, 0.0, 0.45);
    }
    else if (PlayerInfo[playerid][pAdmin] == 1450) // Von dem Adminrang 1-1338 wird das 3D angezeigt
    {
    new GMTEXT3[MAX_PLAYER_NAME];
    if (PlayerInfo[playerid][pSex] == 1)
    GMTEXT3 = "Server Owner";
    else if (PlayerInfo[playerid][pSex] == 2)
    GMTEXT3 = "Server Owner";
    ADMIN4[playerid] = Create3DTextLabel(GMTEXT3,0xC3BE0EFF,0,0,0,70.5,1);
    Attach3DTextLabelToPlayer(ADMIN4[playerid], playerid, 0.0, 0.0, 0.45);
    }
    return 1;
    }

    2 Mal editiert, zuletzt von VaporX ()

  • public OnPlayerRegister(playerid, password[])
    {
    if(IsPlayerConnected(playerid))
    {
    CreateAccount(playerid, password);
    SavePlayer(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "Account erfolgreich Erstellt. Logge dich bitte mit /login [Passwort] ein!");


    }

    return 1;
    }




    stock SavePlayer(playerid)
    {
    if(IsPlayerConnected(playerid)) //wir überprüfen ob der Spieler überhaupt noch Connected ist und ob er nicht ein NPC ist.
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 1) //Und hier ob er noch eingeloggt ist.
    {
    //Nun speichern wir die Daten in der Datenbank.
    //mysql_SetInt("accounts", "Passwort", PlayerInfo[playerid][pKey], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Level", PlayerInfo[playerid][pLevel], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Admin", PlayerInfo[playerid][pAdmin], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Supporter", PlayerInfo[playerid][pSupporter], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "DonateRank", PlayerInfo[playerid][pDonateRank], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "UpgradePoints", PlayerInfo[playerid][gPupgrade], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "ConnectedTime", PlayerInfo[playerid][pConnectTime], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Registered", PlayerInfo[playerid][pReg], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Sex", PlayerInfo[playerid][pSex], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Age", PlayerInfo[playerid][pAge], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Origin", PlayerInfo[playerid][pOrigin], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "CK", PlayerInfo[playerid][pCK], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Muted", PlayerInfo[playerid][pMuted], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Respect", PlayerInfo[playerid][pExp], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Money", PlayerInfo[playerid][pCash], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Bank", PlayerInfo[playerid][pAccount], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Crimes", PlayerInfo[playerid][pCrimes], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Kills", PlayerInfo[playerid][pKills], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Deaths", PlayerInfo[playerid][pDeaths], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Arrested", PlayerInfo[playerid][pArrested], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "WantedDeaths", PlayerInfo[playerid][pWantedDeaths], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Phonebook", PlayerInfo[playerid][pPhoneBook], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "LottoNr", PlayerInfo[playerid][pLottoNr], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Fishes", PlayerInfo[playerid][pFishes], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "BiggestFish", PlayerInfo[playerid][pBiggestFish], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Job", PlayerInfo[playerid][pJob], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "PayCheck", PlayerInfo[playerid][pPayCheck], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "HeadValue", PlayerInfo[playerid][pHeadValue], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Jailed", PlayerInfo[playerid][pJailed], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "JailTime", PlayerInfo[playerid][pJailTime], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Materials", PlayerInfo[playerid][pMats], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Drugs", PlayerInfo[playerid][pDrugs], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Leader", PlayerInfo[playerid][pLeader], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Member", PlayerInfo[playerid][pMember], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "FMember", PlayerInfo[playerid][pFMember], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Rank", PlayerInfo[playerid][pRank], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Char", PlayerInfo[playerid][pChar], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "ContractTime", PlayerInfo[playerid][pContractTime], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "DetSkill", PlayerInfo[playerid][pDetSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "SexSkill", PlayerInfo[playerid][pSexSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "BoxSkill", PlayerInfo[playerid][pBoxSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "LawSkill", PlayerInfo[playerid][pLawSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "MechSkill", PlayerInfo[playerid][pMechSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "JackSkill", PlayerInfo[playerid][pJackSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "CarSkill", PlayerInfo[playerid][pCarSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "NewsSkill", PlayerInfo[playerid][pNewsSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "DrugsSkill", PlayerInfo[playerid][pDrugsSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "CookSkill", PlayerInfo[playerid][pCookSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "FishSkill", PlayerInfo[playerid][pFishSkill], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetFloat("accounts", "pSHealth", PlayerInfo[playerid][pHealth], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetFloat("accounts", "pHealth", PlayerInfo[playerid][pSHealth], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Int", PlayerInfo[playerid][pInt], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Local", PlayerInfo[playerid][pLocal], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Team", PlayerInfo[playerid][pTeam], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Model", PlayerInfo[playerid][pModel], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "PhoneNr", PlayerInfo[playerid][pPnumber], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "House", PlayerInfo[playerid][pPhousekey], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Bizz", PlayerInfo[playerid][pPbiskey], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "HandyGeld", PlayerInfo[playerid][pHandyGeld], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "HandyVer", PlayerInfo[playerid][pHandyVer], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetFloat("accounts", "Pos_x", PlayerInfo[playerid][pPos_x], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetFloat("accounts", "Pos_y", PlayerInfo[playerid][pPos_y], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetFloat("accounts", "Pos_z", PlayerInfo[playerid][pPos_z], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "CarLic", PlayerInfo[playerid][pCarLic], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "NewLic", PlayerInfo[playerid][pNewLic], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "FlyLic", PlayerInfo[playerid][pFlyLic], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "BoatLic", PlayerInfo[playerid][pBoatLic], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "FishLic", PlayerInfo[playerid][pFishLic], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "GunLic", PlayerInfo[playerid][pGunLic], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "LKWLic", PlayerInfo[playerid][pLKWLic], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "MotoLic", PlayerInfo[playerid][pMotoLic], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Zig", PlayerInfo[playerid][pZig], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "ZigSucht", PlayerInfo[playerid][pZigSucht], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Sprengstoff", PlayerInfo[playerid][pSprengstoff], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Gun1", PlayerInfo[playerid][pGun1], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Gun2", PlayerInfo[playerid][pGun2], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Gun3", PlayerInfo[playerid][pGun3], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Gun4", PlayerInfo[playerid][pGun4], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Ammo1", PlayerInfo[playerid][pAmmo1], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Ammo2", PlayerInfo[playerid][pAmmo2], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Ammo3", PlayerInfo[playerid][pAmmo3], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Ammo4", PlayerInfo[playerid][pAmmo4], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "CarTime", PlayerInfo[playerid][pCarTime], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "PayDay", PlayerInfo[playerid][pPayDay], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "PayDayHad", PlayerInfo[playerid][pPayDayHad], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "CDPlayer", PlayerInfo[playerid][pCDPlayer], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Wins", PlayerInfo[playerid][pWins], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Loses", PlayerInfo[playerid][pLoses], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "AlcoholPerk", PlayerInfo[playerid][pAlcoholPerk], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "DrugPerk", PlayerInfo[playerid][pDrugPerk], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "MiserPerk", PlayerInfo[playerid][pMiserPerk], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "PainPerk", PlayerInfo[playerid][pPainPerk], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "TraderPerk", PlayerInfo[playerid][pTraderPerk], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Tutorial", PlayerInfo[playerid][pTut], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Warnings", PlayerInfo[playerid][pWarns], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Adjustable", PlayerInfo[playerid][pAdjustable], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Fuel", PlayerInfo[playerid][pFuel], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Married", PlayerInfo[playerid][pMarried], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "MarriedTo", PlayerInfo[playerid][pMarriedTo], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "SpawnChange", SpawnChange[playerid], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "WantedLevel", WantedLevel[playerid], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "WantedPoints", WantedPoints[playerid], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Roadblock", PlayerInfo[playerid][pRoadblock], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "PlayMinutes", PlayerInfo[playerid][pPlayMinutes], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "GesamtMinutes", PlayerInfo[playerid][pGesamtMinutes], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "MinutesSinceLogin", PlayerInfo[playerid][pMinutesSinceLogin], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "MinutesSinceAn", PlayerInfo[playerid][pMinutesSinceAn], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "SFPASS", PlayerInfo[playerid][pSFPASS], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "LVPASS", PlayerInfo[playerid][pLVPASS], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "HandyGeld", PlayerInfo[playerid][pHandyGeld], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "HandyVer", PlayerInfo[playerid][pHandyVer], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Uhr", PlayerInfo[playerid][pUhrID], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Handy", PlayerInfo[playerid][pHandyID], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "pTot", PlayerInfo[playerid][pTot], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetFloat("accounts", "pTx", PlayerInfo[playerid][pTx], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetFloat("accounts", "pTy", PlayerInfo[playerid][pTy], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetFloat("accounts", "pTz", PlayerInfo[playerid][pTz], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "KnastTime", KnastTime[playerid], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Offflucht", OfflineFlucht[playerid], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Perso", PlayerInfo[playerid][pOwnPerso], "Name", PlayerInfo[playerid][pUserName]);
    //mysql_SetFloat("accounts", "Health", PlayerInfo[playerid][pOwnAntrag], "Name", PlayerInfo[playerid][pUserName]);
    //mysql_SetFloat("accounts", "Health", PlayerInfo[playerid][pPersoStop], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "FrakSperre", PlayerInfo[playerid][pFrakSperre], "Name", PlayerInfo[playerid][pUserName]);
    mysql_SetInt("accounts", "Gebannt", PlayerInfo[playerid][pGebannt], "Name", PlayerInfo[playerid][pUserName]);






    }
    }
    return 1;
    }





    hoffe ihr könnt mir helfen
    und sry wegen doppel post aber anders gings ned :D


    mfg
    VaporX

    Einmal editiert, zuletzt von VaporX ()

  • könntest du mir ein beispiel machen ?


    auserdem kann es daran liegen das manche sachen nicht richtig geladen/gespeichert werden ?

    Einmal editiert, zuletzt von VaporX ()

  • SSCANF!!!!!!!!!
    Lad die ganze Zeile und dann zerteile die Zeile mit sscanf:


    sscanf(string, "e<p<|>variablenbuchstaben", PlayerInfo[playerid]);
    Das wird dann durch das e< direkt in den enum PlayerInfo[playerid] gepackt.
    Und für die Variablenbuchstaben schau mal hier nach.


    //Edit: Du sparst extrem viel Zeit, da du nur eine Mysql abfrage hast.
    Und du sparst hunderte Zeilen!

  • Hey,
    ich entpfehle dir nich MySQL da MySQL nur Fehler hat,
    zumiedest bei mir immer nur fehler,
    ich habe 59Accs gespeichert(Wurden) und dann nichts mehr.