21.08.2010, 15:33
How i can check if 4+ players in range of point example : 10.0 ?
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
new play_count = 0, bool:maxplayers;
maxplayers = false;
if(play_count <= 4) continue;
{
if(IsPlayerInRangeOfPoint(i, 10, x, y, z))
{
play_count++;
}
}
if(play_count > 4)
{
maxplayers = true;
break;
}
}