Dini won't save on player disconnect
#2

If you want to set 1 = registered and 0 = not registered use
pawn Код:
new
    file[ 50 ];

format( CurrentFile, sizeof( CurrentFile ), PlayerFile, gPlayerInfo[ playerid ][ /* your_enum_here */ ] );
if( dini_Exists( CurrentFile )
{
    dini_IntSet( file, "Registered", 1 );
}
Else, if you want to save Player's name as I saw here "PLAYER_NAME". That is string, not integer.
Like
pawn Код:
enum pInfo
{
    PLAYER_NAME[ MAX_PLAYER_NAME ],
    Rest
}

// ---
new
    Name[ MAX_PLAYER_NAME ];

GetPlayerName( playerid, Name, sizeof( Name ) );
 
format( CurrentFile, sizeof( CurrentFile ), PlayerFile, gPlayerInfo[ playerid ][ /* your_enum_here */ ] );
if( dini_Exists( CurrentFile )
{
    dini_Set( file, "Name", Name );
}
Reply


Messages In This Thread
Dini won't save on player disconnect - by Born2die - 21.01.2012, 20:29
Re: Dini won't save on player disconnect - by Konstantinos - 21.01.2012, 20:50
Re: Dini won't save on player disconnect - by Born2die - 21.01.2012, 21:35
Re: Dini won't save on player disconnect - by Born2die - 21.01.2012, 23:54

Forum Jump:


Users browsing this thread: 1 Guest(s)