15.11.2010, 12:10
pawn Code:
stock SavePlayerStats(playerid)
{
dini_IntSet(file, "Score", GetPlayerScore(playerid));
dini_IntSet(file, "Money", GetPlayerMoney(playerid));
dini_IntSet(file, "level", PlayerInfo[playerid][Level]);
dini_IntSet(file, "Cold", PlayerInfo[playerid][Cold]);
dini_IntSet(file, "Hot", PlayerInfo[playerid][Hot]);
printf("Player id %d has his files saved", playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SavePlayerStats(playerid);
return 1;
}