Posts: 1,498
Threads: 110
Joined: Aug 2013
Quote:
Originally Posted by FaLLenGirL
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:
PHP Code:
new Float:healthx;
GetPlayerHealth( playerid, healthx );
pInfo[ playerid ][ pHealth ] = healthx;
3. SetPlayerHealth( playerid, Float:health_amount ), is the function to set the health amount.
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 );
}
}
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.
|
Hey dude thanks but as I said I have server sided health... setplayerhealth wont WORK.