givehp gethp?
#1

OK so I basically have a server sided health and all that stuff recently I wanted to make a new system that gives players hp... (the actualy hp perk gives them like this pInfo[playerid][pHealth] += 150; )

So my code is here:
Code:
if(team[i] == TEAM_HUMAN)
			{
	            GetHealth(i,hp);
	            if(hp < 80)
				{
	                GiveHealth(i,hp+3.5);
My gethealth stock function
Code:
stock GetHealth(playerid) { return pInfo[playerid][pHealth]; }
My GiveHealth stock function
Code:
//stock GiveHealth(playerid { return pInfo[playerid][pHealth] ++; )
Disabled cuz it fucks the whole gm...
Now how do I correctly write the code? to store the hp and then give it.

I tried this and results:
Code:
pInfo[i][pHealth] += 3.5;
Empty statement lol.
Reply


Messages In This Thread
givehp gethp? - by Crystallize - 12.06.2017, 15:35
Re: givehp gethp? - by FaLLenGirL - 12.06.2017, 16:00
Re: givehp gethp? - by Crystallize - 12.06.2017, 16:01
Re: givehp gethp? - by FaLLenGirL - 12.06.2017, 16:08
Re: givehp gethp? - by Crystallize - 12.06.2017, 16:15
Re: givehp gethp? - by FaLLenGirL - 12.06.2017, 16:17
Re: givehp gethp? - by Crystallize - 12.06.2017, 16:18
Re: givehp gethp? - by Whatname - 12.06.2017, 16:20
Re: givehp gethp? - by FaLLenGirL - 12.06.2017, 16:26
Re: givehp gethp? - by Crystallize - 12.06.2017, 16:28

Forum Jump:


Users browsing this thread: 5 Guest(s)