mkafrin / PolyZone

PolyZone is a FiveM mod to define zones of different shapes and test whether a point is inside or outside of the zone
MIT License
204 stars 191 forks source link

Question? #44

Closed cademullen closed 3 years ago

cademullen commented 3 years ago

Is there currently a way to check to see if there is a anyone in a polyzone. What I would like to do is if everyone left a zone, then, remove a ped. If one person is still in the polyzone the ped is still there.

mkafrin commented 3 years ago

Hmm, best way I could think of is use onPlayerInOut and trigger a server event when the player enters or leaves to keep track server-side how many players are in the zone. When it reaches zero, you can remove the ped.

cademullen commented 3 years ago

Ah that would work thank you!