First alphabet of the password only
#1

Hello,

I have a problem with my register system.

If a person registers with the password "Happy" in scriptfiles his password is saved as "H" , only the first alphabet .... I dont know why ... Please look at the register command below


pawn Код:
new playername[MAX_PLAYER_NAME];
            new string[500];
            PlayerInfo[playerid][pPassword] = inputtext[playerid];
            GetPlayerName(playerid, playername, sizeof(playername));
            format(string, sizeof(string), "\\Accounts\\%s.ini", playername);
            new File: file = fopen(string, io_read);
            if (file)
            {
                new s[128],pName[24];
                GetPlayerName(playerid, pName, 24);
            format(s,sizeof(s),"Welcome, %s!\n\nThat name is allready used",pName);
                ShowPlayerDialog(playerid,60,1,"Register your account",s,"Register"," ");
                fclose(file);
                Kick(playerid);
                return 1;
            }
            new File:hFile;
            hFile = fopen(string, io_append);
            new var[32];
        format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);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);
        PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
        format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
        format(var, 32, "Admin=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
            fclose(hFile);
            SendClientMessage(playerid, Green, "[Server]: Succesfully Registered!");
            OnPlayerLogin(playerid,inputtext);
            TutorialTime[playerid] = 1;

Thanks for helping
Reply


Messages In This Thread
First alphabet of the password only - by Peter_Corneile - 13.10.2009, 08:21
Re: First alphabet of the password only - by yom - 13.10.2009, 10:53
Re: First alphabet of the password only - by woot - 13.10.2009, 12:12
Re: First alphabet of the password only - by Peter_Corneile - 13.10.2009, 14:03
Re: First alphabet of the password only - by Peter_Corneile - 13.10.2009, 14:06
Re: First alphabet of the password only - by dice7 - 13.10.2009, 14:41
Re: First alphabet of the password only - by Peter_Corneile - 13.10.2009, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)