Server Sided Health/Armour Functions.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.
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;
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.
Source: Server Sided Health/Armour Functions. (https://sampforum.blast.hk/showthread.php?tid=677133)