18.07.2018, 09:15
Nothing new, the solution for it is in the gl_npcs filterscript from 2010:
Code:
//------------------------------------------------- // IMPORTANT: This restricts NPCs connecting from // an IP address outside this server. If you need // to connect NPCs externally you will need to modify // the code in this callback. public OnPlayerConnect(playerid) { if(IsPlayerNPC(playerid)) { new ip_addr_npc[64+1]; new ip_addr_server[64+1]; GetServerVarAsString("bind",ip_addr_server,64); GetPlayerIp(playerid,ip_addr_npc,64); if(!strlen(ip_addr_server)) { ip_addr_server = "127.0.0.1"; } if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) { // this bot is remote connecting printf("NPC: Got a remote NPC connecting from %s and I'm kicking it.",ip_addr_npc); Kick(playerid); return 0; } printf("NPC: Connection from %s is allowed.",ip_addr_npc); } return 1; }