10.07.2015, 16:30
This can work:
pawn Код:
CMD:yourcommand(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return 0;
new pInZone = 0;
new playerIDs[ 20 ];
foreach(new i: Player)
{
if(IsPlayerInRangeOfPoint(i, Float:range, Float:x, Float:y, Float:z)) {
playerIDs[pInZone] = i;
pInZone++;
}
}
if(pInZone < 4)
return SendClientMessage(playerid, -1, "There must be at least 4 players in the range!");
foreach(new j : Player)
{
for(new i = 0; i < 20; i++)
{
if(j == playerIDs[i])
SendClientMessage(j, "You are one of the players in the zone!");
}
}
return 1;
}