Big problem with saving money
#1

well, my saving system can't save money...

Код:
public OnPlayerDisconnect(playerid, reason)
{
 	OnPlayerLogout(playerid);
 	SendDeathMessage(INVALID_PLAYER_ID,playerid, 201);
	return 1;
}
Код:
OnPlayerLogout(playerid)
{
    new uFile[35];

    format(uFile, 35, USER_FILE, PlayerName(playerid));

    new INI:playerFile = INI_Open(uFile);
    INI_WriteInt(playerFile, "Admin", PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(playerFile, "VIP", PlayerInfo[playerid][CHB]);
    INI_WriteInt(playerFile, "Novac", PlayerInfo[playerid][pMoney]);
    INI_WriteInt(playerFile, "Skin", GetPlayerSkin(playerid));
    INI_WriteInt(playerFile, "Warn", PlayerInfo[playerid][warn]);
    INI_WriteInt(playerFile, "Ubojstva", PlayerInfo[playerid][pKills]);
    INI_WriteInt(playerFile, "Lider", PlayerInfo[playerid][Lider]);
    INI_WriteInt(playerFile, "Clan", PlayerInfo[playerid][Clan]);
    INI_WriteInt(playerFile, "Rank", PlayerInfo[playerid][Rank]);
    INI_WriteInt(playerFile, "Smrti", PlayerInfo[playerid][pDeaths]);
    INI_WriteInt(playerFile, "Minute", PlayerInfo[playerid][Minute]);

    INI_Close(playerFile);
    return 1;
}
Reply
#2

Change to
pawn Код:
INI_WriteInt(playerFile, "Novac", GetPlayerMoney(playerid));
Unless, you're using server side for money and you should use it as you did.
Reply
#3

PlayerInfo[playerid][pMoney]

^^ it's getting updated current money of the player?
Reply
#4

Quote:
Originally Posted by RedCrossER
Посмотреть сообщение
PlayerInfo[playerid][pMoney]

^^ it's getting updated current money of the player?
yes, but on relog money gone..

now its resolved, i think
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)