21.01.2012, 20:50
If you want to set 1 = registered and 0 = not registered use
Else, if you want to save Player's name as I saw here "PLAYER_NAME". That is string, not integer.
Like
pawn Код:
new
file[ 50 ];
format( CurrentFile, sizeof( CurrentFile ), PlayerFile, gPlayerInfo[ playerid ][ /* your_enum_here */ ] );
if( dini_Exists( CurrentFile )
{
dini_IntSet( file, "Registered", 1 );
}
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 );
}