/**
* Created by AMXX-Stuido
* User: ITenGriTR
* Date: 09.08.2019
* Time 15.21
*/
#include <amxmodx>
#define dBannedUsersFile "addons/amxmodx/configs/bannedusers.ini"
public plugin_init(){
register_plugin
("User Controller",
"1.0",
"Berk");
}
public client_putinserver(uIndex){
if(file_exists(dBannedUsersFile)){
new uIpAdress[16];
get_user_ip(uIndex,uIpAdress,charsmax(uIpAdress),1);
new lFile = fopen(dBannedUsersFile,"rt"),lData[16],lParsedData[17];
while(!feof(lFile)) {
fgets(lFile,lData,charsmax(lData));
parse(lData,lParsedData,charsmax(lParsedData));
if(equali(uIpAdress,lParsedData)){
new uUserID;
uUserID = get_user_userid(uIndex);
server_cmd("kick #%d ^"Bu Servere Giremezsiniz!^"",uUserID);
}
}
fclose(lFile);
}
else{
log_amx("[WEBDiyo]: Kontrolsuz giris lutfen ini dosyasini olusturun {%s}",dBannedUsersFile);
}
}