Health/Armour saving issue
#1

So every time i join the server i keep on dying per every spawn.What could be the issue?
Under enum
Code:
Float:pHealth,
Float:pArmor
Under load user callback
Code:
INI_Float("Health",PlayerInfo[playerid][pHealth]);
INI_Float("Armour",PlayerInfo[playerid][pArmor]);
Under OnPlayerDisconnect
Code:
new Float:health = PlayerInfo[playerid][pHealth],Float:armor = PlayerInfo[playerid][pArmor];
GetPlayerHealth(playerid,health);
GetPlayerArmour(playerid,armor);
INI_WriteFloat(File,"Health", PlayerInfo[playerid][pHealth]);
INI_WriteFloat(File,"Armour", PlayerInfo[playerid][pArmor]);
Under OnPlayerSpawn for already registered players
Code:
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
Reply


Messages In This Thread
Health/Armour saving issue - by Mike861 - 13.06.2018, 19:39
Re: Health/Armour saving issue - by Lokii - 13.06.2018, 19:50
Re: Health/Armour saving issue - by xMoBi - 13.06.2018, 19:51
Re: Health/Armour saving issue - by Mike861 - 13.06.2018, 19:53
Re: Health/Armour saving issue - by Lokii - 13.06.2018, 19:56
Re: Health/Armour saving issue - by Mike861 - 13.06.2018, 20:03
Re: Health/Armour saving issue - by Lokii - 13.06.2018, 20:08
Re: Health/Armour saving issue - by Mike861 - 14.06.2018, 06:23
Re: Health/Armour saving issue - by Exhibit - 14.06.2018, 13:56
Re: Health/Armour saving issue - by Akeem - 14.06.2018, 14:42
Re: Health/Armour saving issue - by Mike861 - 14.06.2018, 17:58
Re: Health/Armour saving issue - by Mike861 - 14.06.2018, 18:43

Forum Jump:


Users browsing this thread: 4 Guest(s)