OnPlayerGiveDamageActor Not Calling -
Novacaine - 16.07.2017
Hi everyone,
When I shoot actors OnPlayerGiveDamageActor callback is not calling. I can't figure out why. It was working a while ago. But because of some reason which is i don't know, it stopped working. What can cause this issue?
EDIT: I've put a print message in public but it's not showing up either. I also set actor's invulnerable to false.
EDIT 2: Problem solved!

Check
this if you have the same problem.
Re: OnPlayerGiveDamageActor Not Calling -
tungki - 16.07.2017
did u try to test it?
pawn Код:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
new string[128], attacker[MAX_PLAYER_NAME];
new weaponname[24];
GetPlayerName(playerid, attacker, sizeof (attacker));
GetWeaponName(weaponid, weaponname, sizeof (weaponname));
format(string, sizeof(string), "%s has made %.0f damage to actor id %d, weapon: %s", attacker, amount, damaged_actorid, weaponname);
SendClientMessageToAll(0xFFFFFFFF, string);
return 1;
}
Re: OnPlayerGiveDamageActor Not Calling -
Novacaine - 16.07.2017
Quote:
Originally Posted by tungki
did u try to test it?
pawn Код:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart) { new string[128], attacker[MAX_PLAYER_NAME]; new weaponname[24]; GetPlayerName(playerid, attacker, sizeof (attacker)); GetWeaponName(weaponid, weaponname, sizeof (weaponname)); format(string, sizeof(string), "%s has made %.0f damage to actor id %d, weapon: %s", attacker, amount, damaged_actorid, weaponname); SendClientMessageToAll(0xFFFFFFFF, string); return 1; }
|
Yes. I've put a print message right after public header. But it's not showing up.
Re: OnPlayerGiveDamageActor Not Calling - Astralis - 16.07.2017
Try it on a normal server, not home host. Easy fix.
Re: OnPlayerGiveDamageActor Not Calling -
Novacaine - 03.08.2017
Problem is still going on. Can anyone help?
Re: OnPlayerGiveDamageActor Not Calling -
Xeon™ - 03.08.2017
that's SAMP i guess. i've seen hundred's of simillars issues.
OnPlayerGiveDamageActor doesn't work anymore. i don't know why. (downgrade to 0.3x and try again)
Re: OnPlayerGiveDamageActor Not Calling -
oMa37 - 03.08.2017
Make sure you set the actor's invulnerability to 0,
SetActorInvulnerable.
Quote:
Originally Posted by XeonMaster
OnPlayerGiveDamageActor doesn't work anymore. i don't know why. (downgrade to 0.3x and try again)
|
Quote:
Originally Posted by SA-MP Wiki
This callback was added in SA-MP 0.3.7 and will not work in earlier versions!
|
Re: OnPlayerGiveDamageActor Not Calling -
Novacaine - 03.08.2017
Quote:
Originally Posted by oMa37
|
Re: OnPlayerGiveDamageActor Not Calling -
Xeon™ - 03.08.2017
Quote:
Originally Posted by oMa37
|
that's make me sure.
Actors was released first time for 0.3.7 so there might be some bugs on it.
EDIT: @OP set actor health to 100 and try again.
Re: OnPlayerGiveDamageActor Not Calling -
Leitoo - 12.11.2017
Quote:
Originally Posted by Novacaine
Hi everyone,
When I shoot actors OnPlayerGiveDamageActor callback is not calling. I can't figure out why. It was working a while ago. But because of some reason which is i don't know, it stopped working. What can cause this issue?
EDIT: I've put a print message in public but it's not showing up either. I also set actor's invulnerable to false.
|
Solved ? If it is, tell me the solution please! ahah