SA-MP Forums Archive
[Ajuda] Erro - 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] Erro (/showthread.php?tid=324485)



[Ajuda] Erro - [NVC]Eduardo - 09.03.2012

Alguйm pode me ajuda a arruma esse erro
pawn Код:
C:\Users\Casa\Desktop\brasil expert\gamemodes\Race.pwn(4325) : error 017: undefined symbol "GetNumberOfPlayersOnThisIP"
C:\Users\Casa\Desktop\brasil expert\gamemodes\Race.pwn(29164) : warning 219: local variable "anim" shadows a variable at a preceding level
C:\Users\Casa\Desktop\brasil expert\gamemodes\Race.pwn(29170) : warning 219: local variable "anim" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Linha:
pawn Код:
}ARConnect(playerid);
new connecting_ip[32+1];
GetPlayerIp(playerid,connecting_ip,32);
new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);
if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP){
new tmp3[50];
GetPlayerIp(playerid,tmp3,50);
SendClientMessage(playerid, -1, "3 CONEXХES COM O MESMO IP NO SERVIDOR Й PROIBIDO!");
new stringbot[128];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
new File:BOTS=fopen("bots.txt", io_append);
format(stringbot, sizeof(stringbot), "Player: %s - IP: %s\r\n", pname, tmp3);
fwrite(BOTS, stringbot);
fclose(BOTS);
Ban(playerid);
}



Re: [Ajuda] Erro - Delete_ - 09.03.2012

cara eu nгo aconselho vocк a usar esse ARconnect, eu usei ele por um tempo, as vezes ele comeзa a kickar todo mundo.

@TOPIC:

pawn Код:
stock GetNumberOfPlayersOnThisIP(test_ip[])
{
    new against_ip[32+1];
    new x = 0;
    new ip_count = 0;
    for(x=0; x<MAX_PLAYERS; x++) {
        if(IsPlayerConnected(x)) {
            GetPlayerIp(x,against_ip,32);
            if(!strcmp(against_ip,test_ip)) ip_count++;
        }
    }
    return ip_count;
}