[Ajuda] Aparece perto
#1

Jб fiz de tudo, mas nгo consigo й o seguinte, para aparece apenas para as pessoas que estгo prуximas, o comando de contagem.
code:
pawn Код:
if(strcmp(cmd, "/contagem", true) == 0)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    format(file, sizeof(file), PASTA_CONTAS, aname);
    if(pAdmin[playerid] == 5) {

        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, Vermelho, "Uso: /contagem [quantia]");
            return 1;
        }
        new contando = strval(tmp);
        for(new i=0; i < MAX_PLAYERS; i++) {
            if(noevento[i] == 1) {
                contar[i] = contando;
                contagem[i] = SetTimerEx("Contagem", 1000, true, "i", i);
            }
        }
    }
    else {
        SendClientMessage(playerid, Vermelho, "* Vocк nгo tem acesso a esse comando!");
    }
    return 1;
}
+REP
Reply
#2

Adicione no code :
pawn Код:
new Float:Coords[3];
GetPlayerPos(playerid,Coords[0],Coords[1],Coords[2]);
for(new x = 0; x != MAX_PLAYERS; x++)
{
if(IsPlayerInRangeOfPoint(x,80.0,Coords[0],Coords[1],Coords[2])) // Onde esta 80.0 = a distancia,para ser vista.
{
Uso em meu gm TDM..
se der erro avise.
Reply
#3

pawn Код:
if(strcmp(cmd, "/contagem", true) == 0)
{
    if(pAdmin[playerid] == 5)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, Vermelho, "Uso: /contagem [quantia]");
            return 1;
        }
        new contando = strval(tmp);
        for(new i=0; i < MAX_PLAYERS; i++)
        {
            if(noevento[i] == 1)
            {
                if(GetDistanceBetweenPlayers(playerid, i) < 25)
                {
                    contar[i] = contando;
                    contagem[i] = SetTimerEx("Contagem", 1000, true, "i", i);
                }
            }
        }
        else {
            SendClientMessage(playerid, Vermelho, "* Vocк nгo tem acesso a esse comando!");
        }
        return 1;
    }
Reply
#4

Quote:
Originally Posted by @Riichard
Посмотреть сообщение
Adicione no code :
pawn Код:
new Float:Coords[3];
GetPlayerPos(playerid,Coords[0],Coords[1],Coords[2]);
for(new x = 0; x != MAX_PLAYERS; x++)
{
if(IsPlayerInRangeOfPoint(x,80.0,Coords[0],Coords[1],Coords[2])) // Onde esta 80.0 = a distancia,para ser vista.
{
Uso em meu gm TDM..
se der erro avise.
Nem deu
-
[LF]Player funfo +rep para vocк;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)