[HELP] TaskPlayAnim with npc

When luld <1, PlayingAnim doesn’t change for false value because i’m not in drawmarker, but if distance between marker and luld > to 6, PlayingAnim change values to false.

On the other hand, when I put a line in the array, it works But beyond a single line, it does not stop the animation.

What I want to do is put PlayingAnim on false when the player is away from the marker.

The reason as to why it loops for you is because you are in range for both, causing it to nonstop be false and true.
And you don’t have to draw a marker, I only used it for debugging the exact locations.

And if you set luld > 6, it needs to be placed further away so it’s not inside distance.

1 Like

The player will not necessarily pass in the marker, and that’s why I check according to the distance
And the shop marker may be in the perimeter of the citizen, that’s why I check the distance and not the reverse.

I think the problem comes from the fact that there are several lines in the table because when I have only one line, it works, even in the perimeter of the citizen.

For those who need

if distance > 5.5 and distance < 6 then
PlayingAnim = false
1 Like

thank you :slight_smile: script working now !

Can you release this whole script?

Bro, how can we set a player close to a place then spawn PED
example : We type a coordinates in the script then the player and that coord distance is 10 meter on that time ped no spawn then the play is less than 9 meter distance then spawn ped on that coordinates how can we set like that

how to change animation?