SA-MP Forums Archive
[Ajuda] Quantidade de players - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Quantidade de players (/showthread.php?tid=470415)



Quantidade de players - Lucas Ventura - 17.10.2013

O que estб errado?

Gostaria de mostrar a quantidade de players daquela org que estб dentro da gang zone.

pawn Код:
CMD:local(playerid, params[])
{
    if(PlayerToPoint(2, playerid, 1127.4275,-1939.3912,58.6547))
    {
        for(new i = 0; i < GetMaxPlayers(); i++)
        {
            if (PlayerInfo[i][pOrg] == 1)
            {
                if(IsPlayerInArea(i,1058.59375,-2146.484375,1271.484375,-1914.0625))
                {
                    new string[128];
                    format(string, sizeof(string), "%d pessoas da org 1 neste local.", i);
                    SendClientMessageToAll(-1, string);
                }
            }
        }
    }
    return 1;
}



AW: Quantidade de players - ipsBruno - 17.10.2013

Entschuldigung, aber du kannst nur alle 240 Sekunden einen Beitrag erstellen. Du musst noch 17

pawn Код:
CMD:local(playerid, params[])
{
    new ORGS;
    if(PlayerToPoint(2, playerid, 1127.4275,-1939.3912,58.6547))
    {
        for(new i = 0; i < GetMaxPlayers(); i++)
        {
            if (PlayerInfo[i][pOrg] == 1)
            {
                if(IsPlayerInArea(i,1058.59375,-2146.484375,1271.484375,-1914.0625))
                {
                    ORGS++;
                }
            }
        }
    }

   static string[128];

   format(string, sizeof(string), "%d pessoas da org 1 neste local.", ORGS);
   SendClientMessage(playerid,-1, string);
   return 1;
}