How do i save health in file?
#1

Hello, Ive been trying to save my players health in his file using the following

Код:
public OnPlayerDisconnect(playerid, reason)
{
	new Float:health, Float:armour, Name[MAX_PLAYER_NAME], File[256];
	GetPlayerName(playerid, Name, sizeof(Name));
	format(File, sizeof(File), PFile, Name);
	if(PInfo[playerid][Logged] == 1)
	{
		dini_IntSet(File, "Health", GetPlayerHealth(playerid,health));
		dini_IntSet(File, "Armour", GetPlayerArmour(playerid, armour));
		return 1;
	}
	return 1;
}
but it saves the health as 1 and the armour as one what ever the health or armour may be.. so even if its full when he leaves it still saves as one. Please help
Reply


Messages In This Thread
How do i save health in file? - by wilko1995 - 03.05.2012, 13:37
Re: How do i save health in file? - by JaTochNietDan - 03.05.2012, 13:40
Re: How do i save health in file? - by wilko1995 - 03.05.2012, 13:47

Forum Jump:


Users browsing this thread: 1 Guest(s)