load accounts[+rep]
#1

I'm working on a new project and I have a problem with load account
sometimes when you login your account doesn't load so you get everything reseted
I'm using load way like in the gf
Reply
#2

Mysql Ini ?
Reply
#3

pawn Код:
stock OnPlayerLogin(playerid,password[])
{
    new tmp2[128];
    new string2[256];
    format(string2, sizeof(string2), "%s.ini",PlayerName(playerid));
    new File: UserFile = fopen(string2, io_read);
    if ( UserFile )
    {
        new PassData[128];
        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(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 ); }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)