Quote:
Originally Posted by SharpenBlade
Seems ok, but I don't think you can set player's health without using SetPlayerHealth.
PHP Code:
GetPlayerHealthEx(playerid) return Player[playerid][Health];
GetPlayerArmorEx(playerid) return Player[playerid][Armor];
SetPlayerHealthEx(playerid, Float:HpAmount)
{
Player[playerid][Health] = HpAmount;
SetPlayerHealth(playerid, Player[playerid][Health]);
return 1;
}
SetPlayerArmorEx(playerid, Float:ArmorAmount)
{
Player[playerid][Armor] = ArmorAmount;
SetPlayerArmor(playerid, Player[playerid][Armor]);
return 1;
}
Or check this: https://forum.sa-mp.com/showpost.php...61&postcount=6
|
Yeah, I see your point but the only time ill use SetPlayerHealth Code is upon initial spawn, to set them to infinite Health, other than that, the only data for health im using is from MySQL, the enumerator where the MySQL Data is stored, and the Textdraw where the players health is displayed.
I only want to get players health from the TD now, not the old values from GetPlayerHealth, so I want to mimic the functions that i used to have.