11.03.2011, 11:37
Hello everyone.
I made a gamemode with login/register system using Dini.
I want it to save the health of the player.
I did like this:
This is from the "OnPlayerDisconnect" -callback:
But it doesnt work.
When i disconnect, it just sets "Health=1" in the ini file.
Any ideas? Thanks.
I made a gamemode with login/register system using Dini.
I want it to save the health of the player.
I did like this:
This is from the "OnPlayerDisconnect" -callback:
pawn Код:
if(dini_Exists(file))
{
PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
PlayerInfo[playerid][pActivity] = GetPlayerScore(playerid);
new Float:health;
PlayerInfo[playerid][pHealth] = GetPlayerHealth(playerid,health);
dini_IntSet(file, "Money",PlayerInfo[playerid][pMoney]);
dini_IntSet(file, "Health",PlayerInfo[playerid][pHealth]);
dini_IntSet(file, "Activity",PlayerInfo[playerid][pActivity]);
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
dini_IntSet(file, "Banned",PlayerInfo[playerid][pBanned]);
}
When i disconnect, it just sets "Health=1" in the ini file.
Any ideas? Thanks.