Multiple Player Function ?
#3

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;
}
Reply


Messages In This Thread
Multiple Player Function ? - by rockhopper - 10.07.2015, 16:17
Re: Multiple Player Function ? - by notime - 10.07.2015, 16:20
Re: Multiple Player Function ? - by [XST]O_x - 10.07.2015, 16:30
Re: Multiple Player Function ? - by rockhopper - 10.07.2015, 16:36
Re: Multiple Player Function ? - by Threshold - 10.07.2015, 17:46
Re: Multiple Player Function ? - by rockhopper - 11.07.2015, 15:18

Forum Jump:


Users browsing this thread: 1 Guest(s)