#define MAX_CONNECTIONS_FROM_IP 3
public OnPlayerConnect(playerid)
// MAX IPS
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) {
printf("MAXIPs: Connecting player(%d) exceeded %d IP connections from %s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
SendClientMessage(playerid, COLOR_WHITE, "If you think its unfair ban, then appeal on forums.");
format(string, sizeof(string), "AdmCmd: ID %d has been banned by MOLE, reason: exceeded IP-Connections limit", playerid);
SendClientMessageToAll(COLOR_LIGHTRED, string);
//Your ban code here
return 1;
}
C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2259) : error 017: undefined symbol "GetNumberOfPlayersOnThisIP" C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2263) : error 017: undefined symbol "string" C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2263) : error 017: undefined symbol "string" C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2263) : error 029: invalid expression, assumed zero C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2263) : fatal error 107: too many error messages on one line |
C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(226 : error 017: undefined symbol "GetNumberOfPlayersOnThisIP" |
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++) {
In the SA-MP 0.3x server folder there's a filterscript called "maxips"
Try to instal it because that solved my problem |
C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2119) : error 029: invalid expression, assumed zero C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2119) : error 017: undefined symbol "GetNumberOfPlayersOnThisIP" C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2124) : warning 219: local variable "x" shadows a variable at a preceding level C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2127) : error 017: undefined symbol "test_ip" C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2122) : warning 204: symbol is assigned a value that is never used: "x" C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2122 -- 2134) : warning 225: unreachable code C:\Users\ever_be\Videos\2\New folder (4)\cnr\New folder\changed\gamemodes\SFCRRPG.pwn(2283) : error 017: undefined symbol "GetNumberOfPlayersOnThisIP" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
Under the #define COLOR_X 0x...
under all those add pawn Код:
pawn Код:
pawn Код:
|