12.06.2017, 16:00
I really don't know what can this ever work.
Try this maybe it will be okay.
1. Why u use another stocks.. there are already functions to get health or to set health.
2. GetPlayerHealth( playerid, Float:health_amount ), is the fuction to get the health. Example:
3. SetPlayerHealth( playerid, Float:health_amount ), is the function to set the health amount.
YOUR CODE IT WILL WORK IF U USE THIS:
In my opinion your functions are not correct and also why to use another functions
if there exist already fuctions for this and u can use it for sure.
Try this maybe it will be okay.
1. Why u use another stocks.. there are already functions to get health or to set health.
2. GetPlayerHealth( playerid, Float:health_amount ), is the fuction to get the health. Example:
PHP Code:
new Float:healthx;
GetPlayerHealth( playerid, healthx );
pInfo[ playerid ][ pHealth ] = healthx;
YOUR CODE IT WILL WORK IF U USE THIS:
PHP Code:
if( team[ i ] == TEAM_HUMAN )
{
new Float:hp;
GetPlayerHealth( i, hp );
if( hp < 80 )
{
SetPlayerHealth( i, hp + 3.5 );
}
}
if there exist already fuctions for this and u can use it for sure.