Just a question, i saw that Incognito hooked the OnPlayerWeaponShot method.
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if (hittype == BULLET_HIT_TYPE_PLAYER_OBJECT)
{
Streamer_CallbackHook(STREAMER_OPWS, playerid, weaponid, hittype, hitid, fX, fY, fZ);
}
#if defined Streamer_OnPlayerWeaponShot
return Streamer_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ);
#else
return 1;
#endif
}
#if defined Streamer_OnPlayerWeaponShot
forward Streamer_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
#endif
#if defined _ALS_OnPlayerWeaponShot
#undef OnPlayerWeaponShot
#else
#define _ALS_OnPlayerWeaponShot
#endif
#define OnPlayerWeaponShot Streamer_OnPlayerWeaponShot
It will return 1 always? So we can't block the damage? Because Streamer_OnPlayerWeaponShot is not defined, only after the callback declaration.
Edit: My listfile:
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if (hittype == 4)
{
Streamer_CallbackHook((9), playerid, weaponid, hittype, hitid, fX, fY, fZ);
}
#line 500
return 1;
#line 502
}