[HELP] Barbershop (check pos)

Hi, I’m trying to know the positions of all the players, to determine if they are close to a position or not, I can’t manage to collect the positions of all the players at once.

I redid a hairdresser script, you take a place via the cashier and it teleports you to a seat with a ped coming except that this script was made for a single store, like you couldn’t make two hairdressers, I fixed it except that I don’t know how to make it so that when someone is seated in a hairdresser it blocks the possibility of taking a hairdresser in that store, there was already a callback that was put in except that it blocked the everyone seats, so that’s what I’m looking for to know everyone’s pos to check if there is a guy in the barber seat

I would have thought to take the list of players via esx_society, then take the pos via the sources of each player

e6d9cfa34ba38947e79134c3b65775f5-png

That’s the long way 'round that you’re suggesting - it would be significantly easier to use a native to check if the spot is occupied or not.
Try using this one or similar for a test:

I will try this

I tried it and it seems to work, I reversed it like if the place is occupied it puts me the hairdresser, because I’m all alone for testing and it puts me the message that it’s occupied, but this native works for the players? or is it looking if there is something that blocks with this position?

image_2021-08-05_000524

Did you actually read through the native’s description and what parameters it needs? The way you’ve done it in the screenshot won’t work - you’re not giving it the correct parameters.