How i can make?
#1

How i can check if 4+ players in range of point example : 10.0 ?
Reply
#2

pawn Код:
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;
    }
}
Max loop for 4 persons, if you want to make it that there should be 4 at least, change <= to >= and > to <
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)