15.08.2011, 09:22
For you, it works 100%
In my logic, it works 0%
You didn't even load it stats when a people connects.
I guess, it worked in your server, but it didn't even compile ( the tutorial )
I guess, you didn't used Y_INI.
Not bad, you are good in explaining.
In my logic, it works 0%
pawn Код:
undefined symbol "playerFile"
pawn Код:
#define playerFile "%s.ini"
stock getini( playerid ) {
new name[24]; GetPlayerName( playerid, name, 24 ); new file[ 64 ]; format( file, playerFile, name );
return file;
}
pawn Код:
public OnPlayerConnect( playerid )
{
if ( fexist( getini( playerid ) ) )
{
INI_ParseFile( getini( playerid ), "position", .bExtra = true, .extra = playerid );
}
return 1;
}
forward position( playerid, name[], value[] );
public position( playerid, name[ ], value[ ] )
{
INI_Float( "LastX", playerInfo[ playerid ][ posX ] );
// .......
return 1;
}
// AND
stock onPlayerLogout( playerid )
{
new
INI: pFile = INI_Open( getini( playerid ) )
;
INI_WriteFloat(pFile, "LastX", PlayerInfo[playerid][pLastX]);
INI_WriteFloat(pFile, "LastY", PlayerInfo[playerid][pLastY]);
INI_WriteFloat(pFile, "LastZ", PlayerInfo[playerid][pLastZ]);
INI_Close(pFile);
return 1;
}
public OnPlayerDisconnect( playerid )
return onPlayerLogout( playerid );
I guess, you didn't used Y_INI.
Not bad, you are good in explaining.