19.04.2012, 17:23
Well I didn't understand how can I load something from a file.
I made it so OnPlayerDisconnect it saves the player's score and it works fine.
But how can I do that OnPlayerConnect it takes the score's integer from the INI file?
I made it so OnPlayerDisconnect it saves the player's score and it works fine.
But how can I do that OnPlayerConnect it takes the score's integer from the INI file?
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
new
fileToWrite[] = "players.INC",
INI:iniFile = INI_Open(fileToWrite), name[MAX_PLAYER_NAME], score = GetPlayerScore(playerid);
GetPlayerName(playerid, name, sizeof(name));
INI_SetTag(iniFile, "Players Score");
INI_WriteInt(iniFile, name, score);
INI_Close(iniFile);
return 1;
}