SA-MP Forums Archive
help with playergivedamage - 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 with playergivedamage (/showthread.php?tid=538428)



help with playergivedamage - Ryz - 21.09.2014

I am getting this error after adding headshot system


pawn Код:
C:\Users\Ryz\Desktop\codww2.pwn(7354) : error 025: function heading differs from prototype
this is codes

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) //This is error line
{
    if(bodypart == 9)
    {
        if(weaponid == 34)
        {
            if(GetPlayerTeam(damagedid) != GetPlayerTeam(playerid))
                    {
                        SetPlayerHealth(damagedid, 0);
                        GameTextForPlayer(playerid, "~g~HEADSHOT", 2000, 6);
                        GameTextForPlayer(damagedid, "~r~HEADSHOT", 2000, 6);
                        SendClientMessage(playerid, COLOR_PINK, "[NOTICE]: You got +1XP for the headshot.");
                        SetPlayerScore(playerid, GetPlayerScore(playerid) +1);
                    }
                }
            }
    return 1;
}



Re: help with playergivedamage - Rudy_ - 21.09.2014

Compiles fine for me

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) //This is error line
{
    if(bodypart == 9)
    {
        if(weaponid == 34)
        {
            if(GetPlayerTeam(damagedid) != GetPlayerTeam(playerid))
            {
                SetPlayerHealth(damagedid, 0);
                GameTextForPlayer(playerid, "~g~HEADSHOT", 2000, 6);
                GameTextForPlayer(damagedid, "~r~HEADSHOT", 2000, 6);
                SendClientMessage(playerid, COLOR_PINK, "[NOTICE]: You got +1XP for the headshot.");
                SetPlayerScore(playerid, GetPlayerScore(playerid) +1);
            }
        }
    }
    return 1;
}



Re: help with playergivedamage - Ryz - 21.09.2014

but i am getting that error


Re: help with playergivedamage - LeroyII - 21.09.2014

Same for me.. Try to use latest includes!


Re: help with playergivedamage - Ryz - 21.09.2014

can you guess which one need to be updated?

pawn Код:
#include <a_samp>
#include <sscanf2>
#include <streamer>
#include <boxmsg>
#include <zcmd>
#include <Dini>
#include <Dutils>
#include <FloodControl>
#include <fuckCleo>
#include <lethaldudb2>
#include <SII>
#include <foreach>
#include <player_progressbar>



Re: help with playergivedamage - LeroyII - 21.09.2014

Quote:
Originally Posted by Ryz
Посмотреть сообщение
can you guess which one need to be updated?

pawn Код:
#include <a_samp>
#include <sscanf2>
#include <streamer>
#include <boxmsg>
#include <zcmd>
#include <Dini>
#include <Dutils>
#include <FloodControl>
#include <fuckCleo>
#include <lethaldudb2>
#include <SII>
#include <foreach>
#include <player_progressbar>
Try a_samp


Re: help with playergivedamage - KayJ - 21.09.2014

Quote:
Originally Posted by LeroyII
Посмотреть сообщение
Try a_samp
nope, streamer


Re: help with playergivedamage - LeroyII - 21.09.2014

Quote:
Originally Posted by SturtIndia
Посмотреть сообщение
nope, streamer
Are you sure? When i was testing it i only used a_samp.


Re: help with playergivedamage - Ryz - 21.09.2014

streamer is already upto-date. i should try a_samp


Re: help with playergivedamage - Ryz - 21.09.2014

worked!
a_samp update worked.
thanks for help guys