InGame-Name (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
  • Huhu ihr lieben,
    ich habe das Problem,
    wenn ich z.b. [BR]Name eingebe, als Spielernamen, dann wird dieser nicht erkannt (also ich kann nicht auf den Server, ich werde von der Welt geworfen), wenn ich die eckigen Klammern weg lasse, funktioniert alles, nur mit Klammern halt nicht...
    habt ihr eine Idee, woran das liegt?

  • Der Code vom Register:


    Das Problem ist, wenn ich mich mit dem Namen mit der Klammer registrieren will und dann auf 'weiter' klicken will, geht er nicht weiter, sondern, ich falle aus der Welt. Ohne den Klammern, geht es ganz normal weiter.

  • Okay und jetzt das "OnPlayerLogin" bitte


    public OnPlayerLogin(playerid,password[])
    {
    new tmp2[256];
    new string2[100];
    //new string[256];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Accounts/%s.ini", playername2);
    SpawnPlayer(playerid);
    if ( fexist(string2) )
    {
    new valtmp[256];
    valtmp = dini_Get(string2, "Key");
    strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp), 255);
    //printf("key: %s | pw: %s", PlayerInfo[playerid][pKey],password);
    if(strcmp(PlayerInfo[playerid][pKey],password) == 0 )
    {
    PlayerInfo[playerid][pLevel] = dini_Int(string2, "Level");
    PlayerInfo[playerid][pAdmin] = dini_Int(string2, "AdminLevel");
    PlayerInfo[playerid][pDonateRank] = dini_Int(string2, "DonateRank");
    PlayerInfo[playerid][gPupgrade] = dini_Int(string2, "UpgradePoints");
    PlayerInfo[playerid][pConnectTime] = dini_Int(string2, "ConnectedTime");
    PlayerInfo[playerid][pReg] = dini_Int(string2, "Registered");
    PlayerInfo[playerid][pSex] = dini_Int(string2, "Sex");
    PlayerInfo[playerid][pAge] = dini_Int(string2, "Age");
    PlayerInfo[playerid][pOrigin] = dini_Int(string2, "Origin");
    PlayerInfo[playerid][pCK] = dini_Int(string2, "CK");
    PlayerInfo[playerid][pMuted] = dini_Int(string2, "Muted");
    PlayerInfo[playerid][pExp] = dini_Int(string2, "Respect");
    PlayerInfo[playerid][pCash] = dini_Int(string2, "Money");
    PlayerInfo[playerid][pAccount] = dini_Int(string2, "Bank");
    PlayerInfo[playerid][pCrimes] = dini_Int(string2, "Crimes");
    PlayerInfo[playerid][pKills] = dini_Int(string2, "Kills");
    PlayerInfo[playerid][pDeaths] = dini_Int(string2, "Deaths");
    PlayerInfo[playerid][pArrested] = dini_Int(string2, "Arrested");
    PlayerInfo[playerid][pWantedDeaths] = dini_Int(string2, "WantedDeaths");
    PlayerInfo[playerid][pPhoneBook] = dini_Int(string2, "Phonebook");
    PlayerInfo[playerid][pLottoNr] = dini_Int(string2, "LottoNr");
    PlayerInfo[playerid][pFishes] = dini_Int(string2, "Fishes");
    PlayerInfo[playerid][pBiggestFish] = dini_Int(string2, "BiggestFish");
    PlayerInfo[playerid][pJob] = dini_Int(string2, "Job");
    PlayerInfo[playerid][pPayCheck] = dini_Int(string2, "Paycheck");
    PlayerInfo[playerid][pHeadValue] = dini_Int(string2, "HeadValue");
    PlayerInfo[playerid][pJailed] = dini_Int(string2, "Jailed");
    PlayerInfo[playerid][pJailTime] = dini_Int(string2, "JailTime");
    PlayerInfo[playerid][pMats] = dini_Int(string2, "Materials");
    PlayerInfo[playerid][pDrugs] = dini_Int(string2, "Drugs");
    PlayerInfo[playerid][pLeader] = dini_Int(string2, "Leader");
    PlayerInfo[playerid][pMember] = dini_Int(string2, "Member");
    PlayerInfo[playerid][pFMember] = dini_Int(string2, "FMember");
    PlayerInfo[playerid][pRank] = dini_Int(string2, "Rank");
    PlayerInfo[playerid][pChar] = dini_Int(string2, "Char");
    PlayerInfo[playerid][pContractTime] = dini_Int(string2, "ContractTime");
    PlayerInfo[playerid][pDetSkill] = dini_Int(string2, "DetSkill");
    PlayerInfo[playerid][pSexSkill] = dini_Int(string2, "SexSkill");
    PlayerInfo[playerid][pBoxSkill] = dini_Int(string2, "BoxSkill");
    PlayerInfo[playerid][pLawSkill] = dini_Int(string2, "LawSkill");
    PlayerInfo[playerid][pMechSkill] = dini_Int(string2, "MechSkill");
    PlayerInfo[playerid][pJackSkill] = dini_Int(string2, "JackSkill");
    PlayerInfo[playerid][pCarSkill] = dini_Int(string2, "CarSkill");
    PlayerInfo[playerid][pNewsSkill] = dini_Int(string2, "NewsSkill");
    PlayerInfo[playerid][pDrugsSkill] = dini_Int(string2, "DrugsSkill");
    PlayerInfo[playerid][pCookSkill] = dini_Int(string2, "CookSkill");
    PlayerInfo[playerid][pFishSkill] = dini_Int(string2, "FishSkill");
    PlayerInfo[playerid][pSHealth] = dini_Int(string2, "pSHealth");
    PlayerInfo[playerid][pHealth] = dini_Int(string2, "pHealth");
    PlayerInfo[playerid][pInt] = dini_Int(string2, "Int");
    PlayerInfo[playerid][pLocal] = dini_Int(string2, "Local"); //
    PlayerInfo[playerid][pTeam] = dini_Int(string2, "Team");
    PlayerInfo[playerid][pModel] = dini_Int(string2, "Model");
    PlayerInfo[playerid][pPnumber] = dini_Int(string2, "PhoneNr");
    PlayerInfo[playerid][pPhousekey] = dini_Int(string2, "House");
    PlayerInfo[playerid][pPbiskey] = dini_Int(string2, "Bizz");
    PlayerInfo[playerid][pPos_x] = dini_Int(string2, "Pos_x");
    PlayerInfo[playerid][pPos_y] = dini_Int(string2, "Pos_y");
    PlayerInfo[playerid][pPos_z] = dini_Int(string2, "Pos_z");
    PlayerInfo[playerid][pCarLic] = dini_Int(string2, "CarLic");
    PlayerInfo[playerid][pTruckLic] = dini_Int(string2, "TruckLic");
    PlayerInfo[playerid][pBikeLic] = dini_Int(string2, "BikeLic");
    PlayerInfo[playerid][pFlyLic] = dini_Int(string2, "FlyLic");
    PlayerInfo[playerid][pBoatLic] = dini_Int(string2, "BoatLic");
    PlayerInfo[playerid][pFishLic] = dini_Int(string2, "FishLic");
    PlayerInfo[playerid][pGunLic] = dini_Int(string2, "GunLic");
    PlayerInfo[playerid][pGun1] = dini_Int(string2, "Gun1");
    PlayerInfo[playerid][pGun2] = dini_Int(string2, "Gun2");
    PlayerInfo[playerid][pGun3] = dini_Int(string2, "Gun3");
    PlayerInfo[playerid][pGun4] = dini_Int(string2, "Gun4");
    PlayerInfo[playerid][pAmmo1] = dini_Int(string2, "Ammo1");
    PlayerInfo[playerid][pAmmo2] = dini_Int(string2, "Ammo2");
    PlayerInfo[playerid][pAmmo3] = dini_Int(string2, "Ammo3");
    PlayerInfo[playerid][pAmmo4] = dini_Int(string2, "Ammo4");
    PlayerInfo[playerid][pCarTime] = dini_Int(string2, "CarTime");
    PlayerInfo[playerid][pPayDay] = dini_Int(string2, "PayDay");
    PlayerInfo[playerid][pPayDayZeit] = dini_Int(string2, "PayDayZeit");
    PlayerInfo[playerid][pPayDayHad] = dini_Int(string2, "PayDayHad");
    PlayerInfo[playerid][pCDPlayer] = dini_Int(string2, "CDPlayer");
    PlayerInfo[playerid][pWins] = dini_Int(string2, "Wins");
    PlayerInfo[playerid][pLoses] = dini_Int(string2, "Loses");
    PlayerInfo[playerid][pAlcoholPerk] = dini_Int(string2, "AlcoholPerk");
    PlayerInfo[playerid][pDrugPerk] = dini_Int(string2, "DrugPerk");
    PlayerInfo[playerid][pMiserPerk] = dini_Int(string2, "MiserPerk");
    PlayerInfo[playerid][pPainPerk] = dini_Int(string2, "PainPerk");
    PlayerInfo[playerid][pTraderPerk] = dini_Int(string2, "TraderPerk");
    PlayerInfo[playerid][pTut] = dini_Int(string2, "Tutorial");
    PlayerInfo[playerid][pMissionNr] = dini_Int(string2, "Mission");
    PlayerInfo[playerid][pWarns] = dini_Int(string2, "Warnings");
    PlayerInfo[playerid][pAdjustable] = dini_Int(string2, "Adjustable");
    PlayerInfo[playerid][pOwnPerso] = dini_Int(string2, "Perso");
    PlayerInfo[playerid][pGangJailed] = dini_Int(string2, "GangJailed");
    PlayerInfo[playerid][pFuel] = dini_Int(string2, "Fuel");
    PlayerInfo[playerid][pMarried] = dini_Int(string2, "Married");
    PlayerInfo[playerid][pMarriedTo] = dini_Int(string2, "MarriedTo");
    PlayerInfo[playerid][pMuteTime] = dini_Int(string2, "MuteTime");
    PlayerInfo[playerid][pPunkte] = dini_Int(string2, "Punkte");
    PlayerInfo[playerid][pMauled] = dini_Int(string2, "Mauled");
    PlayerInfo[playerid][pGehalt] = dini_Int(string2, "Gehalt");
    PlayerInfo[playerid][pFrakSperre] = dini_Int(string2, "FrakSperre");
    Knast[playerid] = dini_Int(string2, "Knast");
    KnastTime[playerid] = dini_Int(string2, "KnastTime");
    SpawnChange[playerid] = dini_Int(string2, "SpawnChange");
    WantedLevel[playerid] = SetPlayerWantedLevel(playerid, WantedLevel[playerid]);
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FFFFFF}ServerName","{FFFFFF}\n{FF0000}Falsches Passwort! (verleibene Versuche: {FFFFFF}1{FF0000}){FFFFFF}\nDas Passwort ist nicht korrekt! Bitte gib nun dein richtiges Passwort ein:","Login","Abbrechen");
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 4)
    {
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    pIstTot[playerid] = 0;
    PlayerInfo[playerid][pTod] = 0;
    format(string,sizeof(string),"%s wurde vom Server gekickt, Begründung: falsches Passwort (Login)",sendername);
    SendClientMessageToAll(COLOR_IRED,string);
    SendClientMessage(playerid,COLOR_IRED,"** Du hast zu oft das falsche Passwort angegeben, deshalb wurdest du gekickt! **");
    Kick(playerid);
    }
    return 1;
    }
    pIstTot[playerid] = 0;
    PlayerInfo[playerid][pTod] = 0;
    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] = 100.0;
    PlayerInfo[playerid][pHealth] = 100.0;
    PlayerInfo[playerid][pPos_x] = 1478.6859;
    PlayerInfo[playerid][pPos_y] = -1674.6659;
    PlayerInfo[playerid][pPos_z] = 14.0469;
    PlayerInfo[playerid][pInt] = 0;
    PlayerInfo[playerid][pLocal] = 255;
    PlayerInfo[playerid][pTeam] = 3;
    PlayerInfo[playerid][pModel] = 137;
    new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
    PlayerInfo[playerid][pPnumber] = randphone;
    PlayerInfo[playerid][pPhousekey] = 255;
    PlayerInfo[playerid][pPbiskey] = 255;
    PlayerInfo[playerid][pAccount] = 0;
    PlayerInfo[playerid][pReg] = 1;
    GivePlayerMoney(playerid, 2000);
    }
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,sizeof(pName));
    format(tbDir,sizeof(tbDir),foxBanFile,pName);
    if(dini_Exists(tbDir))
    {
    if(dini_Int(tbDir,"fbTime")+dini_Int(tbDir,"fbDuration") > Time())
    {
    new sekki=(dini_Int(tbDir,"fbTime")+dini_Int(tbDir,"fbDuration"))-Time(),minni=sekki/60;
    sekki=sekki-minni*60;
    format(ALLSTRING,sizeof(ALLSTRING),"** Du wurdest für eine Weile vom Server gebannt. Restliche Zeit: %d Minuten %d Sekunden.",minni,sekki);
    SendClientMessage(playerid,COLOR_IRED,ALLSTRING);
    format(ALLSTRING,sizeof(ALLSTRING),"%s wurde vom Server gekickt, Begründung: Timeban", pName);
    SendClientMessageToAll(COLOR_IRED,ALLSTRING);
    Kick(playerid);
    } else { dini_Remove(tbDir); }
    }
    if(PlayerInfo[playerid][pLevel] == -999) //autoban
    {
    Ban(playerid);
    }
    else if(PlayerInfo[playerid][pCK] > 0)
    {
    Kick(playerid);
    }
    format(string2, sizeof(string2), "{FFFFFF}» Herzlich Willkommen zurück, %s",playername2);
    SendClientMessage(playerid, COLOR_WHITE,string2);
    printf("%s has logged in.",playername2);
    if (PlayerInfo[playerid][pDonateRank] >= 1)
    {
    SendClientMessage(playerid, COLOR_WHITE,"{FFFFFF}» Du hast dich mit deinem Pre-Account {00FF00}erfolgreich{FFFFFF} eingeloggt.");
    }
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    format(string2, sizeof(string2), "{FFFFFF}» Du bist dem Admin-Rang {FF0000}%d{FFFFFF} eingeloggt!",PlayerInfo[playerid][pAdmin]);
    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;
    pIstTot[playerid] = 0;
    PlayerInfo[playerid][pTod] = 0;
    SetPlayerHealth(playerid,100);
    SpawnPlayer(playerid);
    format(tmp2, sizeof(tmp2), "~w~Willkommen ~n~~y~ %s", playername2);
    DateProp(playerid);
    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);
    }
    }
    return 1;
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Aber dein Account "[BR]Name" oder wie es heißt, existiert schon in der Datenbank, oder?

    Ja, der Account existiert in der Datenbank und wird auch gespeichert, aber ich falle halt nach dem Login dann aus der Welt, als wenn dann der Server einfach nicht mehr geladen wird, ich kann keine Befehle eingeben, einfach gar nichts.