View Issue Details

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

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.

Activities

CWanted

2013-01-12 20:38

updater   ~~0017948

http://code.google.com/p/mtasa-blue/source/detail?r=4914

IIYAMA12

2013-02-17 01:28

viewer   ~~0018153

Last edited: 2013-02-17 01:29

"Pellets shots" don't count as hits, use: http://wiki.multitheftauto.com/wiki/ProcessLineOfSight to know what you hit with the shotgun.

The element user.data 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