Posts: 1,046
Threads: 29
Joined: Mar 2010
Quote:
Originally Posted by Reboma
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 }
|
It shouldn't affect shot streamer objects. You can still block player shots in your script.