SA-MP Forums Archive
Help - 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: Help (/showthread.php?tid=570298)



Help - Edw - 08.04.2015

This system "Health side" does not really work, if afk and pull it nothing happens

PHP код:
public OnPlayerTakeDamageplayeridissueridFloat:amountweaponidbodypart )
{
  if( 
issuerid != INVALID_PLAYER_ID )
  {
    if( 
playerDeathissuerid ] == )
    {
      new 
FloatHPFloatAPFloattotalhp;
       
GetPlayerHealthExplayeridHP );
     
GetPlayerArmourExplayeridAP );
     
printf("wadawda");
      if ( 
AP >= amount )
      {
        
SetPlayerArmourExplayeridAP amount );
        
SetPlayerHealthExplayeridHP );
      }
      else if ( 
AP <= )
      {
        
totalhp HP amount;
        
SetPlayerHealthExplayeridtotalhp );
        if ( 
totalhp <= && playerDeathplayerid ] == )
        {
          
OnPlayerDeathplayeridissueridweaponid );
          
playerDeathplayerid ] = 1;
        }
      }
      else
      {
        
totalhp HP + ( AP amount );
        
SetPlayerArmourExplayerid0.0 );
        
SetPlayerHealthExplayeridtotalhp );
        if ( 
totalhp <= && playerDeathplayerid ] == )
        {
          
OnPlayerDeathplayeridissueridweaponid );
          
playerDeathplayerid ] = 1;
        }
      }
    }
  }
  return 
1;




Re: Help - Edw - 10.04.2015

help me, please