I Have file with text:
195.58.237.246
62.221.39.111
plug read this and function explode():
PHP Code:
new banned_ip[100][32]
new banned_ip_num = 0
new ipFile[64] = "addons/amxmodx/configs/bannedips/ips.dat"
public plugin_init () { AddIP (); register_srvcmd("aa","aa");}
public aa() {
for (new i = 1;i <=banned_ip_num; i++) {
new ips[4][32]
explode(banned_ip[i],ips,31,'.')
server_print ("%s:%s:%s:%s",ips[0],ips[1],ips[2],ips[3])
}
}
AddIP () {
new text[32], line = 0, unk
while (read_file(ipFile,line++,text,31,unk)) {
banned_ip_num++
format (banned_ip[banned_ip_num],31,text)
}
}
server printed:
195:58:237:246
62
5:221

9
7:111