14.02.2017, 06:56
(
Последний раз редактировалось Unrea1; 14.02.2017 в 08:56.
)
Well, bypassing the "godmode" problem, when an NPC (FCNPC plugin) attacks a player, the player does not receive any damage, not even the callback is called, and killing an NPC appears in the console:
Any ideas?
EDIT:
Fixed, i added in OnPlayerTakeDamage this code:
And in OnPlayerDeath:
PHP код:
[debug] Run time error 4: "Array index out of bounds"
[debug] AMX backtrace:
[debug] #0 0000a1cc in public OnPlayerDeath (playerid=7, killerid=65535, reason=51) at D:\Pawn\LEP Mysql\pawno\include\weapon-config.inc:2494
EDIT:
Fixed, i added in OnPlayerTakeDamage this code:
PHP код:
if(IsPlayerNPC(issuerid))
{
InflictDamage(playerid, amount, issuerid, weaponid, bodypart);
return 0;
}
PHP код:
if(IsPlayerNPC(issuerid))
{
return 0;
}