31.12.2014, 12:58
I just noticed now that OnPlayerTakeDamage on this include isn't properly hooked. I know that Emmet_ is inactive now but since this include is being used by members, I'm posting the fixed OnPlayerTakeDamage part of it here. I've also posted a pull-request regarding it on it's GitHub repository.
Thanks to Kyance for posting an issue about this which led me to find out.
pawn Код:
//Replace the old one with this
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if (g_bCallbacks & CB_OnPlayerBurning && weaponid == 37)
{
if (!(g_cbPlayers[playerid][e_cbFlags] & e_cbBurning))
{
g_cbPlayers[playerid][e_cbFlags] |= e_cbBurning;
CallLocalFunction("OnPlayerBurning", "dd", playerid, 1);
}
g_cbPlayers[playerid][e_cbLastBurn] = GetTickCount();
}
#if defined CB_OnPlayerTakeDamage
return CB_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid, bodypart);
#else
return 1;
#endif
}