16.07.2017, 17:23
PHP код:
// SALVAR
new String[50], Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof Nome);
format(String, sizeof String, "Pasta/%s.ini", Nome);
DOF2_SetInt(String, "Morreu", pInfo[playerid][Morreu]);
DOF2_SetInt(String, "Matou", pInfo[playerid][Matou]);
// CARREGAR
new String[50], Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof Nome);
format(String, sizeof String, "Pasta/%s.ini", Nome);
pInfo[playerid][Matou] = DOF2_GetInt(String, "Matou");
pInfo[playerid][Morreu] = DOF2_GetInt(String, "Morreu");
@DogMal, nгo tem nada haver oq vc falou cara, enum pode ser da maneira que ele definiu.
@PedroH, nossa em.. De onde vc tirou essa lуgica ? '-'
PHP код:
if( DOF2_FileExists( GetPlayerArquivo( playerid ) ) )
{
DOF2_CreateFile(GetPlayerArquivo(playerid));
}
PHP код:
if(!DOF2_FileExists( ..) ) DOF2_CreateFile(..); //Se nгo existir, criar!