їWhy don't save the cords?
#1

When i loggin that load the cords but when i disconnect that's don't save.

pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
new string[150], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "/Usuarios/%s.ini", name);
new INI:File = INI_Open(string);
GetPlayerPos(playerid, pInfo[playerid][PosX], pInfo[playerid][PosY], pInfo[playerid][PosZ]);
INI_WriteFloat( File, "PosicionX", pInfo[playerid][PosX] );
INI_WriteFloat( File, "PosicionY", pInfo[playerid][PosY] );
INI_WriteFloat( File, "PosicionZ", pInfo[playerid][PosZ] );
print(string);
}
Reply
#2

You should close the ini file when all writing is done

INI_Close(File);

Else the buffer eventually isnt written to the file.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)