PDA

View Full Version : how to detect how many people are in a specific area


Lirbo
02/05/2016, 08:34 PM
Let's say if they're in this coords it'd teleport them to somewhere else:


if(IsPlayerInArea(i, -3002.493, -3005.638, 2404.292, 2401.122) && F[2]>100 && F[2]<110){
JQCount=JQCount+1;
if(JQCount > 2){/* Script */}
return 1;}


but the thing is how can I detect that he's leaving the area. if i'll do it the player will just be able to get out and get in again so it'd increase the count

Konstantinos
02/05/2016, 08:36 PM
Dynamic areas by streamer plugin. When OnPlayerLeaveDynamicArea is called, decrease by 1 the global variable (assuming it is).