31.01.2014, 21:49
I have a trouble with health float and a float variable. For example I want to make serversided health.
Here's my code which i use
So what I am trying to do here is to set players current HP into server sided HP, but unfortunately it doesn't work. Whenever I try to check my variable pInfo[playerid][pHealth] or pInfo[playerid][pArmor] they are 0 both they just don't change with my code. Any help would be appreciated.
Here's my code which i use
pawn Code:
enum PlayerInfo
{
Float:pHealth,
Float:pArmor,
}
new pInfo[MAX_PLAYERS][PlayerInfo];
new Float:Health, Float:Armor;
GetPlayerHealth(playerid, Health);
GetPlayerArmour(playerid, Armor);
pInfo[playerid][pHealth] = Health;
pInfo[playerid][pArmor] = Armor;