OnPlayerWeaponShoot BUGG - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerWeaponShoot BUGG (
/showthread.php?tid=513078)
OnPlayerWeaponShoot BUGG -
audriuxxx - 14.05.2014
Hi,
I found bugg in OnPlayerWeaponShoot. When you shoot to player from larg'e distance and shoot for ex with deagle, with that weapon which can't to shoot to large distances, this callback get called, but really bullet don't reach a person.. How to fix it? how to make if bullet don't reach a person, then even if this callback is called, then any code bellow don't work.
Re: OnPlayerWeaponShoot BUGG -
Konstantinos - 14.05.2014
OnPlayerWeaponShot is called whenever a player shoots from a gun, no matter if the player shoots at player/vehicle/object/elsewhere. If the distance between the 2 players is not enough for the bullet to reach and damage the player, I guess the hittype will not be BULLET_HIT_TYPE_PLAYER (correct me if I'm wrong).
Re: OnPlayerWeaponShoot BUGG -
audriuxxx - 14.05.2014
I'am using BULLET_HIT_TYPE_PLAYER, and problem is that this callback and this check is working still..
Re: OnPlayerWeaponShoot BUGG -
Lordzy - 14.05.2014
Quote:
Originally Posted by audriuxxx
I'am using BULLET_HIT_TYPE_PLAYER, and problem is that this callback and this check is working still..
|
It might be getting hit but I assume that the damage would keep on decreasing when the distance increases. Try debugging with OnPlayerTakeDamage to know the damage rates.
Re: OnPlayerWeaponShoot BUGG -
audriuxxx - 15.05.2014
I test it, the distances have to be right, then HP changes. But now asking, what happin when lagg? this callback can be called later, or HP will be changer slower?