01.07.2020, 09:57
(
Last edited by SkyFlare; 01/07/2020 at 10:32 AM.
)
So I am making my own Server Sided Health / Armour in Textdraws, which is complete.
Just looking to upgrade my script a little bit.
in a bonestock standard Script, using GetPlayerHealth(playerid, Player[playerid][Health]);
would get the players Health, and in return save the value into the float specified.
how can I create a function myself like this.. here's what I am doing so far.
Note I am moving right away from the whole standard Get/Set PlayerHealth standard CMDS as they are now useless, because every players HP will be infinite in that value.
Just looking to upgrade my script a little bit.
in a bonestock standard Script, using GetPlayerHealth(playerid, Player[playerid][Health]);
would get the players Health, and in return save the value into the float specified.
how can I create a function myself like this.. here's what I am doing so far.
PHP Code:
GetPlayerHealthEx(playerid, &Float:HpAmount) HpAmount = Player[playerid][Health];
GetPlayerArmorEx(playerid, &Float:ArmorAmount) ArmorAmount = Player[playerid][Armor];
SetPlayerHealthEx(playerid, Float:HpAmount) Player[playerid][Health] = HpAmount;
SetPlayerArmorEx(playerid, Float:ArmorAmount) Player[playerid][Armor] = ArmorAmount;