Health..? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Health..? (
/showthread.php?tid=402709)
Health..? -
Snipa - 27.12.2012
pawn Код:
new Float:hp;
GetPlayerHealth(playerid, hp);
SetPVarFloat(playerid, "rhp", hp);
SetPlayerHealth(playerid, 9999);
Then I call a function to set it back to the old health. The rest of the function works fine
pawn Код:
SetPlayerHealth(playerid, GetPVarFloat(playerid, "rhp"));
But it stays as 9999.
Help!
Re: Health..? -
RedCrossER - 27.12.2012
Well I dont know about player var, try this
New oldhealth[MAX_PLAYERS];
oldhealth[playerid] = getplayerhealth(playerid, healthvariable);
Re: Health..? -
Snipa - 28.12.2012
But GetPlayerHealth doesn't return anything...
Re: Health..? -
Snipa - 30.12.2012
Euh, bump.
Can't seem to get this fixed, even if I use a regular variable or a PVar.