PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "SteamID WhiteList"
#define VERSION "1.0"
#define AUTHOR "akcaliberkk"
new const file[] = "addons/amxmodx/configs/STEAMID.ini"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
if(!file_exists(file)) {
new f = fopen(file,"wt")
fclose(f);
}
}
public client_authorized(id) {
new steamid[32];
get_user_authid(id,steamid,31)
new LineTime[32],LineID[32];
new szLineText[64],txtlen;
new maxlines = file_size(file,1)
for(new line;line<maxlines;line++) {
read_file(file,line,szLineText,63,txtlen)
parse(szLineText,LineTime,31,LineID,31)
if(correct_time(LineTime) && equali(LineID,steamid)) {
return PLUGIN_CONTINUE
}
}
server_cmd("kick #%d ^"SteamID'niz Listede Bulunmamaktadir.^"",get_user_userid(id))
return PLUGIN_HANDLED
}
stock correct_time(const szTime[]) {
new now[32];
new mintime[32],maxtime[32];
new iMinTime,iMaxTime,iTime;
get_time("%H%M",now,31);
copy(mintime,4,szTime)
copy(maxtime,4,szTime[5])
iMinTime = str_to_num(mintime)
iMaxTime = str_to_num(maxtime)
iTime = str_to_num(now)
if(iMinTime <= iTime <= iMaxTime) return true;
return false;
}
canberkcim bu sma nın içerisine /tarama diye bi komut eklemek istiyorum. /tarama komutu uygulandığı zaman serverda, o an sunucudaki steamidleri kontrol edecek. Ve listemizdeki steamid ler ile eşleşmez ise oyundan atacak eşleşmeyenleri anında. Yani sunucudayken atacak eşleşme olmazsa. Ben denedim for ile. Fakat for ile oyunculara yaptırabiliyorum ama ini dosyasını okutamıyorum bu seferde. yardımcı olursan sevinirim. Teşekkürler.