OnPlayerTakeDamage - 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: OnPlayerTakeDamage (
/showthread.php?tid=324748)
OnPlayerTakeDamage -
milanosie - 10.03.2012
Hi, my Onplayertakedamage sometimes doesnt respond like it should, the player can just continue running like nothing ever happend.
pawn Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(weaponid == 23)
{
if(tazer[issuerid] == 1)
{
TogglePlayerControllable(playerid, 0);
SetTimerEx("Tazed", 10000, false, "i", playerid);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
}
}
}
return 1;
}
Re: OnPlayerTakeDamage -
IstuntmanI - 10.03.2012
Don't use
Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
Re: OnPlayerTakeDamage -
milanosie - 10.03.2012
Quote:
Originally Posted by costel_nistor96
Don't use
Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
|
Thats the worst comment I ever heared.
If I remove that it will give me a warning that the symbol needs more explanation etc.
Re: OnPlayerTakeDamage -
Konstantinos - 10.03.2012
Quote:
Originally Posted by milanosie
Thats the worst comment I ever heared.
If I remove that it will give me a warning that the symbol needs more explanation etc.
|
costel_nistor96 is correct!
The callback was added at 0.3d
There is no reason to forward the callback, as it's already.
Re: OnPlayerTakeDamage -
milanosie - 10.03.2012
Quote:
Originally Posted by Dwane
costel_nistor96 is correct!
The callback was added at 0.3d
There is no reason to forward the callback, as it's already.
|
But why does it give me that warning even if I have everything updated?
Re: OnPlayerTakeDamage -
Konstantinos - 10.03.2012
Does it give you warning 235?
pawn Код:
warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
If you got this warning, make sure you have all 0.3d includes.
Else if it's another warning, post it here.