22.02.2018, 21:53
Nгo:
pawn Код:
SavePlayer(playerid)
{
if( DOF2_FileExists( GetPlayerArquivo( playerid ) ) )
{
DOF2_CreateFile(GetPlayerArquivo(playerid));
DOF2_SetInt( GetPlayerArquivo( playerid ), "Score", Player[ playerid ][ Score ] );
DOF2_SetInt( GetPlayerArquivo( playerid ), "Exp", Player[playerid][ Exp ] );
DOF2_SaveFile();
}
return 1;
}
LoadPlayer(playerid)
{
if( DOF2_FileExists( GetPlayerArquivo( playerid ) ) )
{
Player[ playerid ][ Score ] = DOF2_GetInt( GetPlayerArquivo( playerid ), "Score" );
Player[ playerid ][ Exp ] = DOF2_GetInt( GetPlayerArquivo( playerid ), "Exp" );
SetPlayerScore( playerid, Player[ playerid ][ Score ] );
}
return 1;
}