You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you enable 1st person aim flag via setWeaponProperty for a weapon that doesn't have 1st person aim by default (in GTA:SA), then onClientPlayerWeaponFire event returns wrong hit position. More precisely, hit position returned is always the last hit position of a bullet that was shot using a weapon that either has 1st person by default or a 3rd person weapon that doesn't have this flag enabled. Shooting a ped or a vehicle inflicts damaage correctly, despite the event returning bad position.
To reproduce
Use the code provided below. When shooting the pistol without any modifications, the line drawn ends at the exact hit position. After enabling 1st person flag, each shot's hit position will be wrongly returned as the hit position of the last shot before enabling the flag. Turn the flag off and it works properly again.
--server-- lines below give you a pistol and ensure you have 'std' skill level with pistolplayer=getPlayerFromName(<yournicknameingame>)
giveWeapon(player, 22, 1000, true)
setPedStat(player, 69, 500)
-- use the line below in runcode to toggle the 1st person flag on/offsetWeaponProperty(22, 'std', 'flags', 4)
Expected behaviour
The bullet hit position should be returned properly. A weapon with 1st person enabled by default (a sniper rifle for example) is working properly, so it shouldn't be impossible.
Version
Server and client version: v1.5.7-release-18957
The text was updated successfully, but these errors were encountered:
Describe the bug
If you enable 1st person aim flag via setWeaponProperty for a weapon that doesn't have 1st person aim by default (in GTA:SA), then onClientPlayerWeaponFire event returns wrong hit position. More precisely, hit position returned is always the last hit position of a bullet that was shot using a weapon that either has 1st person by default or a 3rd person weapon that doesn't have this flag enabled. Shooting a ped or a vehicle inflicts damaage correctly, despite the event returning bad position.
To reproduce
Use the code provided below. When shooting the pistol without any modifications, the line drawn ends at the exact hit position. After enabling 1st person flag, each shot's hit position will be wrongly returned as the hit position of the last shot before enabling the flag. Turn the flag off and it works properly again.
Expected behaviour
The bullet hit position should be returned properly. A weapon with 1st person enabled by default (a sniper rifle for example) is working properly, so it shouldn't be impossible.
Version
Server and client version: v1.5.7-release-18957
The text was updated successfully, but these errors were encountered: