Yasaklı kodu düzeltebilir misiniz?
Gönderilme zamanı: Sal Tem 26, 2022 3:13 pm
Beyler derlerken yasaklı kod diyor düzeltip atabilirmisiniz
bu eklentinin amacı nedir? bahsedermisin.qalatas06 yazdı: Çrş Tem 27, 2022 6:31 pm Reiz o eklenti ile kodu buluyorum dediği kodu siliyorum tekrar derliyorum ama yine yasaklı kod hatası veriyor eklentiden tekrar baktıgımda yasaklı kod bulmuyor ama panele yükleyince aynı hatayı veriyor düzeltemedim bir türlü
birşeyler yaptım atayım deneyin hala aynısını diyor ise teamspeak3 adresi atınız.qalatas06 yazdı: Çrş Tem 27, 2022 7:36 pm Benim attığım eklentiden bahsediyorsan eğer map içinde top15 listesini silebiliyorsun
Kod: Tümünü seç
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "bugfixdeneme"
new bugfix : bug_fix1
new yasak : yasak_kaldir1
new colorchat : color_chat1
new mapname[100]
new bool: poseduje
new bool: time_delete
new bugfix : bug_fix1
new yasak : yasak_kaldir1
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd( "kz_delete_rec", "uradjeno" )
}
public uradjeno(id)
{
if( !is_user_admin( id ) )
{
client_print( id, print_console, "bu islemi yapmak icin admin olman gerekiyor." )
return PLUGIN_HANDLED
}
poseduje = false;
new dosya = open_dir("/addons/amxmodx/configs/kz/top15", mapname, sizeof(mapname)-1)
new file, fname[100]
new readdata[128]
new ptime[20],psteamid[40],pname[32],pdate[20]
new szarg1[32]
read_argv(1,szarg1,31)
remove_quotes(szarg1);
if( !( containi(szarg1, "STEAM","VALVE") != 1 || strlen( szarg1 ) > 3 ) )
{
client_print( id, print_console, "Moras STEAM:ID ili Nick duzi od 3 slova !" )
return PLUGIN_HANDLED;
}
if(equal(szarg1,"1TIME_DELETE1"))
{
time_delete = false
}
if (dir)
{
while (next_file(dir, mapname, sizeof(mapname)-1))
{
formatex( fname, 99, "/addons/amxmodx/configs/kz/top15/%s", mapname )
file = fopen( fname, "rt" );
if(file)
{
new TempFile[128]; get_configsdir(TempFile, charsmax(TempFile))
new const FileName[] = "tempfile.ini"
format(TempFile, charsmax(TempFile), "/addons/amxmodx/configs/kz/top15/%s", FileName)
new InputFilePointer = fopen(TempFile, "wt")
if(InputFilePointer)
{
//client_print( id, print_console, "MapName^t^t^t^t^t^t^t^t- NICK^t^t^t^t- SteamID^n" ) //ponavlja se na svako brisanje rekorda, nije nesto potrebno
while(!feof(file))
{
fgets(file, readdata, charsmax(readdata))
parse(readdata, ptime, charsmax(ptime), psteamid, charsmax(psteamid), pname, charsmax(pname), pdate, charsmax(pdate))
if((containi(pname, szarg1) != -1 || containi( psteamid, szarg1 ) != -1) && !time_delete )
{
poseduje = true;
client_print( id, print_console, "%s - %s - %s - %s", mapname, pname, ptime, psteamid )
continue;
}
else if( ( containi( ptime, "2." ) != -1 || containi( ptime, "1." ) != -1 || containi( ptime, "0." ) != -1 ) && time_delete && ( strlen( ptime ) == 4 ) )
{
poseduje = true;
time_delete = false
client_print( id, print_console, "TIME_DEL: %s - %s - %s - %s", mapname, pname, ptime, psteamid )
continue;
}
else
fputs(InputFilePointer, readdata)
}
}
fclose(InputFilePointer)
fclose(file)
delete_file(fname)
rename_file(TempFile, fname, 1)
}
}
public function (bug_fix1)
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public function (bug_fix1)
bug_fix1
if (!is_admin_user)
time_delete = false
color_chat(\w"Admin" \g"Degilsin!")
public function (yasak_kaldir1)
yasak_kaldir1
time_delete = true
}
close_dir(dir)
if( !poseduje )
client_print( id, print_console, "[KZ] Silmek icin kayit yok." )
return PLUGIN_CONTINUE;
}