SA-MP Forums Archive
(symbol "OnPlayerGiveDamage") - 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: (symbol "OnPlayerGiveDamage") (/showthread.php?tid=632520)



(symbol "OnPlayerGiveDamage") - Man43 - 15.04.2017

What's wrong here?

... Please Help me...

Код:
public function lacks forward declaration (symbol "OnPlayerGiveDamage")
PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
    if(
Tazer[playerid] == && GetPlayerWeapon(playerid) == TAZE_WEAPON)
    {
        new 
Float:health,losehp;
        
GetPlayerHealth(damagedid,health);
        
losehp TAZE_LOSEHP;
        if(
Tazed[damagedid] == 1) return 1;
        new 
Float:xFloat:yFloat:z;
        
GetPlayerPos(damagedidxyz);
        
ClearAnimations(damagedid);
        
ApplyAnimation(damagedid,"PED","KO_skid_front",4.1,0,1,1,1,0);
        
Spark[damagedid] = CreateObject(TAZE_SPARKxyz-3000);
        
SetTimerEx("DestroySpark"TAZE_DESTROY0"i"damagedid);
        
SetTimerEx("TazedRemove"TAZE_TIMER0"i"damagedid);
        
//TogglePlayerControllable(damagedid, 0);
        
Tazed[damagedid] = 1;
        if(
losehp) {} else SetPlayerHealth(damagedidhealth+amount);
    }
    return 
1;




Re: (symbol "OnPlayerGiveDamage") - AndreiWow - 15.04.2017

Use OnPlayerTakeDamage...


Re: (symbol "OnPlayerGiveDamage") - GoldenLion - 15.04.2017

Update your includes. You are problably using an older version where "bodypart" parameter didn't exist.


Re: (symbol "OnPlayerGiveDamage") - Man43 - 15.04.2017

Same warring... still given me like this warring


Re: (symbol "OnPlayerGiveDamage") - LEOTorres - 15.04.2017

This is most likely due to outdated include files, ensure that all your includes are updated to 0.3.7 - OnPlayerGiveDamage was added in 0.3d.