View Issue Details

IDProjectCategoryView StatusLast Update
0007459Multi Theft Auto : San AndreasClientpublic2013-02-17 01:28
ReporterarranTuna Assigned Toccw  
Status resolvedResolutionfixed 
Target Version1.3.2Fixed in Version1.3.2 
Summary0007459: onClientPlayerWeaponFire hitElement issue

Sometimes shotguns return nil for hitElement when shooting a vehicle even though the vehicle is taking damage.

This is a problem for resources that handle and manipulate players shooting vehicles.

Steps To Reproduce

srun giveWeapon(getPlayerFromName("you"), 25, 1, true)

Spawn a sultan and stand near it

crun addEventHandler("onClientPlayerWeaponFire", root, function(w, a, a2, x, y, z, ele, x1, y1, z1) outputChatBox(tostring(ele).." "..getDistanceBetweenPoints3D(x, y, z, x1, y1, z1).." "..tostring(getPedTarget(source))) end)

Shoot different parts of the vehicle and notice that sometimes it will return nil like if you shoot the bottom of the car doors, but the vehicle still takes damage. getPedTarget works correctly:

How it should be:

userdata: 0001B455 3.886608839035 userdata: 0001B455

How it sometimes is:

nil 4.6356358528137 userdata: 0001B455

TagsNo tags attached.



2013-01-12 20:38

updater   ~~0017948


2013-02-17 01:28

viewer   ~~0018153

Last edited: 2013-02-17 01:29

"Pellets shots" don't count as hits, use: to know what you hit with the shotgun.

The element you receive in stead of the vehicle are probably the parts of the vehicle. But I am not sure.

Issue History

Date Modified Username Field Change