Raised This Month: $ Target: $400
 0% 

variable


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amxxn00b
Junior Member
Join Date: Nov 2006
Old 03-15-2007 , 02:15   Re: variable
Reply With Quote #1

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 
1;<=banned_ip_numi++) {
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 0unk
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
625:22197:111

Last edited by amxxn00b; 03-15-2007 at 05:57.
amxxn00b is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode