Mtasa-blue: isElementWithinMarker bug

Created on 25 Sep 2020  路  6Comments  路  Source: multitheftauto/mtasa-blue

Describe the bug
If you attach a marker to a vehicle, the isElementWithinMarker function will work on the 10th attempt. Works on 20645 and doesn't work on 20646

To reproduce
run this code

local marker = false
addCommandHandler ( "vehicle",
function ( localPlayer )
    local x,y,z = getElementPosition( localPlayer )
    local vehicle = createVehicle( 596, x,y,z )
    marker = createMarker( x,y,z, "cylinder", 1.5 )
    attachElements( marker, vehicle, 0,-4,-1 )
end)

addCommandHandler ( "checkmarker",
function ( localPlayer )
    print(isElementWithinMarker( localPlayer, marker ))
end)

Expected behaviour
it should always work

Version
1.5.7-20651

bug

All 6 comments

r20646

I don't see anything that could directly cause this issue. Maybe @saml1er can help?

I can't reproduce this bug.

and you are in the marker?

I'll record a video

and you are in the marker?

yes

EDIT: The new nightly will be up shortly, then you can test it again and see if it helps. I made some changes to the marker code in 90f429649cfe219c376d875c0014e680e2bc2d9d.

everything works, thank you

Was this page helpful?
0 / 5 - 0 ratings