31.07.2013, 15:16
put this somewhere outside of any publics in ur script:
replace that line:
with:
for a better loop
Код:
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; }
Код:
for(x=0; x<MAX_PLAYERS; x++) {
Код:
for(new x, m = GetMaxPlayers(); x<m; x++) {