meta_target icon indicating copy to clipboard operation
meta_target copied to clipboard

addPlayer doesn't work if player ped is frozen

Open minipunch opened this issue 2 years ago • 7 comments

is it just our death script or can anyone else confirm this also happens to them ?

it looks like it just doesn't detect the 'downed' person for some reason

our death script just sets their ped as just frozen with 1 health

minipunch avatar Jan 19 '23 03:01 minipunch

it appears s2w.get(...) doesn't detect entitys after they are 'frozen' via the FreezeEntityPosition(...)

minipunch avatar Jan 19 '23 03:01 minipunch

ah right

Taavi-AU avatar Jan 19 '23 04:01 Taavi-AU

thats odd, it should still return the player

Taavi-AU avatar Jan 19 '23 04:01 Taavi-AU

Yeah not sure myself why but it does appear that is the case

minipunch avatar Jan 19 '23 05:01 minipunch

Looks like that native screenToWorld uses doesn't register entities that are set to be 'frozen'

minipunch avatar Jan 24 '23 03:01 minipunch

seems like it could be a fivem issue

Taavi-AU avatar Jan 26 '23 06:01 Taavi-AU

Yeah, or just how GTA V is meant to work I guess with that function lol...

Perhaps a workaround would be to just constantly set the entity's coords instead of using FreezeEntityPosition

I plan on trying that and can report back when done

Not sure how that might work if the player is being moved by someone else or put in to a vehicle or smth tho lol

minipunch avatar Jan 31 '23 21:01 minipunch