[HELP] Refusing to login
#4

Код:
if (UserFile)
783.    {
784.        new valtmp[128];
785.        fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
786. 
787.        if ((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0))
788.        {
789.            new key[128],val[128];
790.            new Data[128];
791.            while(fread(UserFile,Data,sizeof(Data)))
792.            {
793.                key = ini_GetKey(Data);
794.                if( strcmp( key , "Admin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
795.                if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMoney] = strval( val ); }
796.                if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
797.                GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);
798.            }
799.            fclose(UserFile);
800.            gPlayerLogged[playerid] = 1;
801.            gPlayerAccount[playerid] = 1;
802.          GetPlayerName(playerid, pname3, sizeof(pname3));
803.            format(string3, sizeof(string3), "You have been successfully logged in");
804.            SendClientMessage(playerid, 0xFFFFFFFF,string3);return 1;
805.        }
806.        else
807.        {
808.            SendClientMessage(playerid, 0xC0C0C0FF, "    Invalid Password");
809.            fclose(UserFile);return 1;//maybe return 0
810.        }
811.    }
812.    return 1;
813.}
try replacing with this.
Not sure
Reply


Messages In This Thread
[HELP] Refusing to login - by FreddeN - 06.12.2009, 12:26
Re: [HELP] Refusing to login - by DJDhan - 06.12.2009, 13:13
Re: [HELP] Refusing to login - by FreddeN - 06.12.2009, 14:44
Re: [HELP] Refusing to login - by DJDhan - 06.12.2009, 14:49
Re: [HELP] Refusing to login - by FreddeN - 09.12.2009, 13:20

Forum Jump:


Users browsing this thread: 1 Guest(s)