|
Senior Member
Join Date: Sep 2008
Location: Poland
|

02-27-2009
, 20:25
Query, select from mysql help me...
|
#1
|
Hi all, I wanna do select in to this plugin.
in line 78 I write querry
PHP Code:
format(query_select,1000,"SELECT tmpNick FROM `%s`, table")
But it dosn't work..
Can you help me, please...
PHP Code:
public client_connect(id) { new ip[16],ip1[16],ip2[16],ip3[16],ip4[16] new ipA[16],ipB[16],a1[16],a2[16],a3[16],a4[16],b1[16],b2[16],b3[16],b4[16] new czas[20],a,index,i,plik[100],len,nieban,c new tmp[100],aq1,aq2,aq3,aq4,bq1,bq2,bq3,bq4,iq1,iq2,iq3,iq4 new CurrentTime[25],iplog[16],name[50] new ipLarge,aLarge,bLarge CurrentTime="" get_time("%Y.%d.%m - %H:%M:%S - ",CurrentTime,25) if(file_exists("addons/amxmodx/ban.txt")!=0) get_user_ip(id,ip,16,1) while( contain ( ip, "." ) > -1 ) replace( ip, 16, ".", " " ) ip1="" ip2="" ip3="" ip4="" parse(ip,ip1,5,ip2,5,ip3,5,ip4,5) iq1=str_to_num(ip1) iq2=str_to_num(ip2) iq3=str_to_num(ip3) iq4=str_to_num(ip4) ipLarge=iq1*255*255*255+iq2*255*255+iq3*255+iq4 index=1 a=0 while (index!=0) { index=read_file("addons/amxmodx/ban.txt",a,plik,100,len) if(index!=0) { parse(plik,ipA,16,ipB,16,czas,10) while( contain ( ipA, "." ) > -1 ) replace( ipA, 16, ".", " " ) a1="" a2="" a3="" a4="" parse(ipA,a1,5,a2,5,a3,5,a4,5) aq1=str_to_num(a1) aq2=str_to_num(a2) aq3=str_to_num(a3) aq4=str_to_num(a4) while( contain ( ipB, "." ) > -1 ) replace( ipB, 16, ".", " " ) b1="" b2="" b3="" b4="" parse(ipB,b1,5,b2,5,b3,5,b4,5) bq1=str_to_num(b1) bq2=str_to_num(b2) bq3=str_to_num(b3) bq4=str_to_num(b4) aLarge=aq1*255*255*255+aq2*255*255+aq3*255+aq4 bLarge=bq1*255*255*255+bq2*255*255+bq3*255+bq4 if(aLarge<=ipLarge<=bLarge) { iplog=ip while( contain(iplog, " " ) > -1 ) replace(iplog, 16, " ", "." ) tmp="" add(tmp,100,CurrentTime) add(tmp,100,iplog) get_user_name(id,name,50) add(tmp,100," <") add(tmp,100,name) add(tmp,100,">") nieban=0 i=1 c=0 new tmpNick[50],tmpPass[50],tmpX[100]; while (i!=0) { tmpX=""; tmpNick=""; tmpPass=""; new query_select[1001] format(query_create,1000,"SELECT tmpNick FROM `%s`, table") parse(tmpX,tmpNick,50,tmpPass,50) if(equal(name,tmpNick)) { nieban=1 } c++ } if(nieban==0) {
write_file("addons/amxmodx/ban.log",tmp); new lReason[128] format(lReason, 127, "%L", id, "YOURE_BANNED") server_cmd("kick #%d Twoje miasto zostalo zbanowane. Wejdz na www.satellite.cba.pl i zloz podanie o konto.", get_user_userid(id), lReason) index=0 } else { add(tmp,100," EXCL") write_file("addons/amxmodx/zaakceptowani.log",tmp); } } } a++ } }
Last edited by Viera; 02-27-2009 at 20:28.
|
|