Jump to content

Question

Posted

Cum as putea rezolva chestia asta:

C:\Documents and Settings\SkyNet\Desktop\™The Server™\pawno\include\alss.inc(152) : warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")

Linie 152 --- 177

public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)

{

if(damagedid != INVALID_PLAYER_ID)

{

if(ALSS_Team[playerid] != ALSS_Team[damagedid] || ALSS_Team[damagedid] == NO_TEAM && (!ALSS_NoGiveDamage[playerid] && !ALSS_NoTakeDamage[damagedid]))

{

new Float:ALSS_pHp = ALSS_Health[damagedid], Float:ALSS_pArmour = ALSS_Armour[damagedid];

if(ALSS_pArmour-amount < 0.0)

{

SetPlayerArmour(damagedid, 0.0);

if(ALSS_pHp-(ALSS_pArmour-amount) < 0.0)

{

if(ALSS_Killer[damagedid] == INVALID_PLAYER_ID)

{

ALSS_Killer[damagedid] = playerid;

ALSS_KillerReason[damagedid] = weaponid;

}

SetPlayerHealth(damagedid, 0.0);

}

else SetPlayerHealth(damagedid, ALSS_pHp-(ALSS_pArmour-amount));

}

else SetPlayerArmour(damagedid, ALSS_pArmour-amount);

}

}

return (ALSS_CallBacks & ALSS_OPGD ? CallLocalFunction("ALSS_OnPlayerGiveDamage", "iifi", playerid, damagedid, amount, weaponid) : 1);

}

560x95_F01616_1625F2_030303_000000.png

1 answer to this question

Recommended Posts

Posted
forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid);
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
   if(damagedid != INVALID_PLAYER_ID)
   {
      if(ALSS_Team[playerid] != ALSS_Team[damagedid] || ALSS_Team[damagedid] == NO_TEAM && (!ALSS_NoGiveDamage[playerid] && !ALSS_NoTakeDamage[damagedid]))
      {
         new Float:ALSS_pHp = ALSS_Health[damagedid], Float:ALSS_pArmour = ALSS_Armour[damagedid];
         if(ALSS_pArmour-amount < 0.0)
         {
            SetPlayerArmour(damagedid, 0.0);
            if(ALSS_pHp-(ALSS_pArmour-amount) < 0.0)
            {
               if(ALSS_Killer[damagedid] == INVALID_PLAYER_ID)
               {
                  ALSS_Killer[damagedid] = playerid;
                  ALSS_KillerReason[damagedid] = weaponid;
               }
               SetPlayerHealth(damagedid, 0.0);
            }
            else SetPlayerHealth(damagedid, ALSS_pHp-(ALSS_pArmour-amount));
         }
         else SetPlayerArmour(damagedid, ALSS_pArmour-amount);
      }
   }
   return (ALSS_CallBacks & ALSS_OPGD ? CallLocalFunction("ALSS_OnPlayerGiveDamage", "iifi", playerid, damagedid, amount, weaponid) : 1);
}

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.