help, inc error
#1

Hi guys, im using an inc to check whether the bullet was shot on head or hand or leg ( This Inc)

When i Include that, i get there
PHP код:
DDM.pwn(308) : warning 235: public function lacks forward declaration (symbol "OnPlayerHeadShot")
DDM.pwn(399) : warning 235: public function lacks forward declaration (symbol "OnPlayerClickMap")
DDM.pwn(484) : warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage"
Whats the problem here ??
Reply
#2

Did you
pawn Код:
#include <GPABP>
?
Reply
#3

Yep.
Reply
#4

Those three callbacks are forwarded in that include so including it, it shouldn't give those warnings.

Try using GetPlayerAimedBodyPart function from that include, does it give any error about undefined symbol? If it does, then it's not included.
Reply
#5

yep, its giving undefined symbol, So i havent included it properly??
Reply
#6

OnPlayerClickMap is a SA-MP native callback, so are you sure you've included them in the correct order?

pawn Код:
#include <headshot>
#include <a_samp>
I know it sounds insane,

Or have you used the include functions before including it?
Reply
#7

Another Question: i made an forward
PHP код:
forward public OnPlayerUnlockAchievement(playeridachievementid); 
But how to set my custom achievementid and how to call this function?? i mean how to make this function work when he unlocks?

EDIT: i included in correct order, i used the functions after including IT.
Reply
#8

I read the first callback and then I saw 3 warnings, plus that include used 3 callbacks so I thought the warnings were for those callbacks. Sorry for misreading.

Anyways, OnPlayerClickMap and OnPlayerGiveDamage were added in 0.3d so your a_samp.inc file is an older version.

Update the server package for 0.3x R2, so a_samp.inc will be for 0.3x version and then save that include under the name GPABP.inc (it must be .inc), place it into pawno\include folder and then:

pawn Код:
#include < a_samp >
#include < GPABP >
Re-compile and you're done.

EDIT:
pawn Код:
forward OnPlayerUnlockAchievement(playerid, achievementid);
public OnPlayerUnlockAchievement(playerid, achievementid)
{
    // code..
}
You can call it then:
pawn Код:
// Somewhere:
CallLocalFunction("OnPlayerUnlockAchievement", "ii", playerid_here, achievementid_here);
Reply
#9

How can i define that achievementid 1 is something and achievementid 2 is something??
Reply
#10

you could put them in an 2d array, If thats what you mean
pawn Код:
new Achievements[3][] =
{
    "Kill 10 Player", // Achievement id = 0
    "Kill 20 player", // 1
    "Kill 100 player" // 2
}
format(string, sizeof(string), "you've finished achevement: %s", Achievements[1]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)