help with playergivedamage
#1

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;
}
Reply
#2

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;
}
Reply
#3

but i am getting that error
Reply
#4

Same for me.. Try to use latest includes!
Reply
#5

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>
Reply
#6

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
Reply
#7

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

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

streamer is already upto-date. i should try a_samp
Reply
#10

worked!
a_samp update worked.
thanks for help guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)