Users.ını gırıs
Gönderilme zamanı: Sal Haz 19, 2018 8:45 am
Alt panelde sadece users.ını gırıs duzenleme yetkısı vermek ıstıyorum hangısını vermem gerekıyor ?
yaptım ancak plugıns.jaıl ınıdır felan hepsıne gırebılıyor ne kadar guvensemde adamıma keylog vs vs Bunları onleyebılmek ıcın sadece users.ını gırmesını ıstıyorum anladıgım kadarıyla sımdılık yok gelıcekmı boyle bırsey ?PaZee yazdı: Sal Haz 19, 2018 8:52 am Adminlikleri görüp silebilir,yeni admin ekleyebilir.
... - Web FTP dosya dosya görüntüleme/açma
... - Web FTP görüntülediği dosyaları kaydetme
yo bılıyorum zaten yetkıver oldunu ancka bız sadece slot 1 ve komut 1 yetkıverden yazıyoruz. Toplantılar ıcın captanlarım'a vermek ıstemıstımmkiranatli yazdı: Sal Haz 19, 2018 8:49 am Ancak sana önerim onu verme, birsürü yetkiver pluginleri var.
Yetkiver plugininden yetkiy azınca otomatik users.ini'ye geçiyor zaten
KaoS | NıckPaZee yazdı: Sal Haz 19, 2018 9:02 am slot taginiz ne ?
[TR] isim [S-1]
gibi bişeymi bir ornek yazarmisin.
Kod: Tümünü seç
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Plug-in"
#define VERSION "1.0"
#define AUTHOR "Kerim Akovali"
new TutIsim[33]
#define MAX 9
#define TEXT "<STEAMTAG><green><TAG> <green><RUTBE> <default><DEATHTAG><TAKIM><team><NICK><default> : <green><SAY>"
new const SlotTag[MAX][] =
{
"[S-1]",
"[S-2]",
"[S-3]",
"[S-4]",
"[S-5]",
"[S-6]",
"[S-7]",
"[S-8]",
"[S-A]"
}
new const KomutcuTag[MAX-2][] =
{
"[K-1]",
"[K-2]",
"[K-3]",
"[K-4]",
"[K-5]",
"[K-6]",
"[K-A]"
}
new const Flag[MAX][] =
{
"b",
"bd",
"bde",
"bdeg",
"bdegh",
"bdeghi",
"bdeghij",
"bdeghijk",
"bdeghijkc"
}
new const FlagKom[MAX-2][] =
{
"bde",
"bde",
"bdeghi",
"bdeghi",
"bdeghijk",
"bdeghijk",
"bdeghijkc"
}
native g_useruid(id)
native erisimsorgu(id)
new const file[] = "addons/amxmodx/configs/users.ini";
new const filename[] = "addons/amxmodx/configs/erisim.ini";
new g_szName[33]
new g_szSifre[33]
new g_szYetki[33]
new bool:Erisima[33]
new bool:Erisimb[33]
new YazimTarzi[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("Isim","mIsim")
register_clcmd("Sifre","mSifre")
register_clcmd("say /onay","onaylama");
register_clcmd("say /yetkiver","yetkiana");
}
public client_disconnected(id)
{
Erisima[id]=false
Erisimb[id]=false
g_szYetki[id]=0
g_szSifre[id]=0
g_szName[id]=0
TutIsim[id]=0
}
public mIsim(id) {
if(!Erisima[id]) {
console_print(id,"Gecersiz Istek !")
return PLUGIN_HANDLED
}
if(get_user_flags(id) & ADMIN_RCON)
{
new text[64];
read_args(text,63)
remove_quotes(text)
if(!text[0]) {
renkli_yazi(id,"!t[!gTRGaming!t] Nick Kismini Bos birakma islemi iptal etmek icin escye basabilirsin.")
client_cmd(id,"messagemode Isim")
return PLUGIN_HANDLED
}
if(admin_exists(text)) {
renkli_yazi(id,"!t[!gTRGaming!t] Bu isimde zaten bir slot var dostum")
client_cmd(id,"messagemode Isim")
return PLUGIN_HANDLED
}
if(text[13])
{
renkli_yazi(id,"!t[!gTRGaming!t] En Fazla 13 karakter dostum !")
client_cmd(id,"messagemode Isim")
return PLUGIN_HANDLED
}
if(containi(text, ",") != -1 || containi(text, "-") != -1 || containi(text, "[") != -1 || containi(text, "]") != -1 || containi(text, "|") != -1)
{
renkli_yazi(id,"!t[!gTRGaming!t] Cakkkala bak")
client_cmd(id,"messagemode Isim")
return PLUGIN_HANDLED
}
static i
for(i = 0; i <= MAX-1;i++)
{
if(i>=7)
{
if(containi(text, SlotTag[i]) != -1)
{
renkli_yazi(id,"!t[!gTRGaming!t] Ben akilli bir sistemim dostum nicke %s gibi seyler Ekleyemessin!",SlotTag[i])
client_cmd(id,"messagemode Isim")
return PLUGIN_HANDLED
}
}
else if(containi(text, SlotTag[i]) != -1 || containi(text, KomutcuTag[i]) != -1)
{
renkli_yazi(id,"!t[!gTRGaming!t] Ben akilli bir sistemim dostum nicke %s veya %s gibi seyler Ekleyemessin!",KomutcuTag[i],SlotTag[i])
client_cmd(id,"messagemode Isim")
return PLUGIN_HANDLED
}
}
copy(g_szName[id],31,text)
Erisima[id] = false;
Erisimb[id] = true;
client_cmd(id,"messagemode Sifre")
renkli_yazi(id,"!t[!gTRGaming!t] Yetkinin Sifresini Girin")
}
return PLUGIN_HANDLED
}
public mSifre(id) {
if(!Erisimb[id]) {
console_print(id,"Gecersiz Istek !")
return PLUGIN_HANDLED
}
if(get_user_flags(id) & ADMIN_RCON)
{
new text[64];
read_args(text,63)
remove_quotes(text)
if(!text[0]) {
renkli_yazi(id,"!t[!gTRGaming!t] Nick Kismini Bos birakma islemi iptal etmek icin escye basabilirsin.")
client_cmd(id,"messagemode Sifre")
return PLUGIN_HANDLED
}
if(text[13])
{
renkli_yazi(id,"!t[!gTRGaming!t] En Fazla 13 karakter dostum !")
client_cmd(id,"messagemode Sifre")
return PLUGIN_HANDLED
}
if(containi(text, ",") != -1 || containi(text, "-") != -1 || containi(text, "[") != -1 || containi(text, "]") != -1 || containi(text, "|") != -1)
{
renkli_yazi(id,"!t[!gTRGaming!t] Cakkkala bak")
client_cmd(id,"messagemode Sifre")
return PLUGIN_HANDLED
}
copy(g_szSifre[id],31,text)
Erisimb[id] = false;
renkli_yazi(id,"!t[!gTRGaming!t] Yazdiginiz Kisinin Ismi: %s Sifresi: %s Yetkisi:%s Yada %s Onaylamak Istiyorsaniz /onay yaziniz",g_szName[id],g_szSifre[id],SlotTag[g_szYetki[id]],KomutcuTag[g_szYetki[id]])
//Some common variables
static motd[99991],len
len = 0
len += formatex(motd[len],sizeof motd - 1 - len,"<center><b>Yazdiginiz Kisinin Ismi: %s Sifresi: %s Yetkisi:%s Yada %s Onaylamak Istiyorsaniz /onay yaziniz</b><br></center>",g_szName[id],g_szSifre[id],SlotTag[g_szYetki[id]],KomutcuTag[g_szYetki[id]])
//Finally, show MOTD
show_motd(id,motd,"Yetkiver")
}
return PLUGIN_HANDLED
}
public onaylama(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
if(g_szName[id] !=0 || g_szYetki[id] !=0 || g_szSifre[id] !=0)
{
YetkiYaz(id,g_szName[id],g_szSifre[id],g_szYetki[id])
renkli_yazi(id,"s2")
g_szName[id]=0
g_szSifre[id]=0
g_szYetki[id]=0
}
renkli_yazi(id,"s1")
}
return PLUGIN_HANDLED
}
public YetkiYaz(id,const Name[],const Sifre[],Yetki)
{
if(get_user_flags(id) & ADMIN_RCON)
{
switch(YazimTarzi[id])
{
case 1:
{
new szLine[512],yonetici[32]
get_user_name(id,yonetici,31)
if(equal(SlotTag[Yetki],"[S-A]"))
{
formatex(szLine,511,"^"KaoS | %s %s^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Slot-Admin^" ^"%s^" // Yazan: ^"%s^"^n ",Name,SlotTag[Yetki],Sifre,Flag[Yetki],TEXT,yonetici)
}
else
{
formatex(szLine,511,"^"KaoS | %s %s^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Slot-%i^" ^"%s^" // Yazan: ^"%s^"^n ",Name,SlotTag[Yetki],Sifre,Flag[Yetki],Yetki+1,TEXT,yonetici)
}
write_file(file,szLine)
renkli_yazi(id,"!t[!gTRGaming!t] Islem Basarili; Isim: KaoS | %s %s Sifre: %s Yetki: %s Yetki Kodu: %s",Name,SlotTag[Yetki],Sifre,SlotTag[Yetki],Flag[Yetki])
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
return PLUGIN_HANDLED
}
case 2:
{
new szLine[512],yonetici[32];
get_user_name(id,yonetici,31)
if(equal(KomutcuTag[Yetki],"[K-A]"))
{
formatex(szLine,511,"^"KaoS | %s %s^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Komutcu-Admin^" ^"%s^" // Yazan: ^"%s^"^n ",Name,KomutcuTag[Yetki],Sifre,FlagKom[Yetki],TEXT,yonetici)
}
else
{
formatex(szLine,511,"^"KaoS | %s %s^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Komutcu-%i^" ^"%s^" // Yazan: ^"%s^"^n ",Name,KomutcuTag[Yetki],Sifre,FlagKom[Yetki],Yetki+1,TEXT,yonetici)
}
write_file(file,szLine)
renkli_yazi(id,"!t[!gTRGaming!t] Islem Basarili; Isim: KaoS | %s %s Sifre: %s Yetki: %s Yetki Kodu: %s",Name,KomutcuTag[Yetki],Sifre,KomutcuTag[Yetki],FlagKom[Yetki])
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
return PLUGIN_HANDLED
}
}
}
return PLUGIN_HANDLED
}
public yetkiana(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
static Item[64];
new Menu;
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetkiver")
Menu = menu_create(Item,"yetkiana_menu_alt")
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetki Verme")
menu_additem(Menu,Item,"1")
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yIslem Yapma")
menu_additem(Menu,Item,"2")
menu_setprop(Menu, MPROP_EXITNAME, "\rCikis")
menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, Menu)
}
return PLUGIN_HANDLED
}
public yetkiana_menu_alt(id,menu,item)
{
if(get_user_flags(id) & ADMIN_RCON)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new access,callback,data[6],iname[64]
menu_item_getinfo(menu,item,access,data,5,iname,63,callback)
new key = str_to_num(data)
switch(key)
{
case 1:yetki_menu(id);
case 2:kisiislem_menu(id);
}
menu_destroy(menu)
}
return PLUGIN_HANDLED
}
public meslek_menu(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
static Item[64];
static Keyer[32]
new Menu;
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\y Yetkiver")
Menu = menu_create(Item,"meslek_alt")
static i
for(i = 0; i <= MAX-1;i++)
{
if(i>=7)
{
if(YazimTarzi[id]==1)
{
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetki:%s YetkiKodu: %s",SlotTag[i],Flag[i])
formatex(Keyer,charsmax(Keyer),"%i",i+1)
menu_additem(Menu,Item,Keyer)
}
}
else
{
switch(YazimTarzi[id])
{
case 1:
{
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetki:%s YetkiKodu: %s",SlotTag[i],Flag[i])
formatex(Keyer,charsmax(Keyer),"%i",i+1)
menu_additem(Menu,Item,Keyer)
}
case 2:
{
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetki:%s YetkiKodu: %s",KomutcuTag[i],FlagKom[i])
formatex(Keyer,charsmax(Keyer),"%i",i+1)
menu_additem(Menu,Item,Keyer)
}
}
}
}
menu_setprop(Menu, MPROP_EXITNAME, "\rCikis")
menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, Menu)
}
return PLUGIN_HANDLED
}
public meslek_alt(id,menu,item)
{
if(get_user_flags(id) & ADMIN_RCON)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new access,callback,data[6],iname[64]
menu_item_getinfo(menu,item,access,data,5,iname,63,callback)
new key = str_to_num(data)-1
g_szYetki[id] = key
Erisima[id] = true
client_cmd(id,"messagemode Isim")
menu_destroy(menu)
}
return PLUGIN_HANDLED
}
public yetki_menu(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
static Item[64];
new Menu;
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetkiver")
Menu = menu_create(Item,"yetki_menu_alt")
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\ySlot Ver")
menu_additem(Menu,Item,"1")
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yKomutcu ver")
menu_additem(Menu,Item,"2")
menu_setprop(Menu, MPROP_EXITNAME, "\rCikis")
menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, Menu)
}
return PLUGIN_HANDLED
}
public yetki_menu_alt(id,menu,item)
{
if(get_user_flags(id) & ADMIN_RCON)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new access,callback,data[6],iname[64]
menu_item_getinfo(menu,item,access,data,5,iname,63,callback)
new key = str_to_num(data)
YazimTarzi[id]=key
meslek_menu(id)
menu_destroy(menu)
}
return PLUGIN_HANDLED
}
public ShowAdminList(id) {
if(get_user_flags(id) & ADMIN_RCON)
{
new menu = menu_create("\rYonetici: \yYetkili belirle","DeleteAdminMenu_Handler")
new szLine[512];
new LineName[32],LinePW[32],LineAccess[32],LineFlag[32],LineDenetim[32];
new maxlines,txtlen,linee[6];
maxlines = file_size(file,1);
for(new line;line<maxlines;line++) {
szLine[0] = 0;
LineName[0] = 0;
LinePW[0] = 0;
LineAccess[0] = 0;
LineFlag[0] = 0;
read_file(file,line,szLine,511,txtlen)
if(szLine[0]) {
parse(szLine,LineName,31,LinePW,31,LineAccess,31,LineFlag,31,LineDenetim,31)
if(equal(LineFlag,"a") && !equal(LineName,";") && !equal(LineName,""))
{
num_to_str(line,linee,5)
menu_additem(menu,LineName,linee)
}
}
}
menu_setprop(menu,MPROP_EXIT,MEXIT_ALL)
menu_display(id,menu,0)
}
return PLUGIN_HANDLED
}
public DeleteAdminMenu_Handler(id,menu,item) {
if(get_user_flags(id) & ADMIN_RCON)
{
if(item == MENU_EXIT) {
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6],name[64];
new access,callback;
menu_item_getinfo(menu,item,access,data,5,name,63,callback)
TutIsim[id]=str_to_num(data)
kisiislem_menu(id)
server_cmd("amx_reloadadmins")
}
return PLUGIN_HANDLED
}
public kisiislem_menu(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
static Item[64];
new Menu;
formatex(Item,charsmax(Item),"Isim belirlemeden islem yapamassiniz!")
Menu = menu_create(Item,"kisiislem_menu_alt")
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetkiyi Sil")
menu_additem(Menu,Item,"1")
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetkiyi 1 Seviye Arttir")
menu_additem(Menu,Item,"2")
formatex(Item,charsmax(Item),"\y!\w-\y\rTRGaming\y!\w-\yYetkiyi 1 Seviye Dusur")
menu_additem(Menu,Item,"3")
formatex(Item,charsmax(Item),"Isim Bul Belirli Isim: %s",isimdondur(id))
menu_additem(Menu,Item,"4")
menu_setprop(Menu, MPROP_EXITNAME, "\rCikis")
menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, Menu)
}
return PLUGIN_HANDLED
}
public kisiislem_menu_alt(id,menu,item)
{
if(get_user_flags(id) & ADMIN_RCON)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new access,callback,data[6],iname[64]
menu_item_getinfo(menu,item,access,data,5,iname,63,callback)
new key = str_to_num(data)
switch(key)
{
case 1:
{
YetkiSil(id);
}
case 2:
{
YetkiArttir(id);
}
case 3:
{
YetkiDusur(id)
}
case 4:
{
ShowAdminList(id)
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
public isimdondur(id)
{
new szLine[512];
new LineName[32],LinePW[32],LineAccess[32],LineFlag[32];
new txtlen;
new line;
line=TutIsim[id];
szLine[0] = 0;
LineName[0] = 0;
LinePW[0] = 0;
LineAccess[0] = 0;
LineFlag[0] = 0;
read_file(file,line,szLine,511,txtlen);
parse(szLine,LineName,31,LinePW,31,LineAccess,31,LineFlag,31);
return LineName
}
public YetkiSil(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
new szLine[512];
new LineName[32],LinePW[32],LineAccess[32],LineFlag[32];
new txtlen;
new line
line=TutIsim[id]
szLine[0] = 0;
LineName[0] = 0;
LinePW[0] = 0;
LineAccess[0] = 0;
LineFlag[0] = 0;
read_file(file,line,szLine,511,txtlen)
if(szLine[0]) {
parse(szLine,LineName,31,LinePW,31,LineAccess,31,LineFlag,31)
if(containi(LineName, "[S-") != -1 || containi(LineName, "[K-") != -1)
{
write_file(file,"",line)
renkli_yazi(id,"!t[!gTRGaming!t] %s Isimli Kisinin Yetkisi Basariyla Silindi",LineName)
TutIsim[id]=0
}
else
{
renkli_yazi(id,"!t[!gTRGaming!t] %s isimli Kisinin isminde [S- veya [K- Bulunamadigi Icin Silme Islemi yapilmiyor!",LineName)
}
}
}
return PLUGIN_HANDLED
}
public YetkiDusur(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
new sndr_name[33]
get_user_name( id, sndr_name, 32 )
new szLine[512];
new LineName[32],LinePW[32],LineAccess[32],LineFlag[32];
new txtlen;
new blabla[4],Yazan[8],YazanIsim[32],satir1[32],satir2[32],satir3[32],satir4[4],satir5[4],satir6[4],satir7[4]
new line
line=TutIsim[id]
szLine[0] = 0;
LineName[0] = 0;
LinePW[0] = 0;
LineAccess[0] = 0;
LineFlag[0] = 0;
read_file(file,line,szLine,511,txtlen)
if(szLine[0])
{
parse(szLine,LineName,31,LinePW,31,LineAccess,31,LineFlag,31,satir1,31,satir2,31,satir3,31,satir4,3,Yazan,7,satir5,3,satir6,3,YazanIsim,31)
new atkafasi
new szArg1[32], szArg2[5],szArg3[5],szArg4[5]
if(containi(LineName, "[K-A]") != -1)
{
atkafasi = 7
return PLUGIN_HANDLED
}
else if(containi(LineName, "[S-A]") != -1)
{
atkafasi = 9
return PLUGIN_HANDLED
}
else
{
strtok(LineName, szArg1, charsmax(szArg1), szArg2, charsmax(szArg2),'-')
strtok(szArg2, szArg4, charsmax(szArg4), szArg3, charsmax(szArg3),']')
//renkli_yazi(id,"!t[!gTRGaming!t] %i %s",str_to_num(szArg4),LineName)
atkafasi = str_to_num(szArg4)
}
if(containi(LineName, "[K-") != -1)
{
if(atkafasi==7)
{
write_file(file,"",line)
formatex(szLine,511,"^"%s-6]^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Komutcu-6^" ^"%s^" // Yazan: ^"%s^" Guncel:%s ",szArg1,LinePW,FlagKom[5],TEXT,YazanIsim,sndr_name)
write_file(file,szLine,line)
renkli_yazi(id,"!t[!gTRGaming!t] Yetki Dusuruldu Yeni Hali ^"%s-6]^" ^"%s^" ^"%s^" ^"a^" // Yazan: ^"%s^" Guncel:%s",szArg1,LinePW,FlagKom[5],YazanIsim,sndr_name)
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
}
else
{
if(atkafasi >=1)
{
write_file(file,"",line)
formatex(szLine,511,"^"%s-%i]^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Komutcu-%i^" ^"%s^" // Yazan: ^"%s^" Guncel:%s ",szArg1,atkafasi-1,LinePW,FlagKom[atkafasi-1],atkafasi+1,TEXT,YazanIsim,sndr_name)
write_file(file,szLine,line)
renkli_yazi(id,"!t[!gTRGaming!t] Yetki Dusuruldu Yeni Hali ^"%s-%i]^" ^"%s^" ^"%s^" ^"a^" // Yazan: ^"%s^" Guncel:%s",szArg1,atkafasi-1,LinePW,FlagKom[atkafasi-1],YazanIsim,sndr_name)
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
}
}
}
else if(containi(LineName, "[S-") != -1)
{
if(atkafasi==9)
{
write_file(file,"",line)
formatex(szLine,511,"^"%s-A]^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Slot-8^" ^"%s^" // Yazan: ^"%s^" Guncel:%s ",szArg1,LinePW,Flag[7],TEXT,YazanIsim,sndr_name)
write_file(file,szLine,line)
renkli_yazi(id,"!t[!gTRGaming!t] Yetki Dusuruldu Yeni Hali ^"%s-8]^" ^"%s^" ^"%s^" ^"a^" // Yazan: ^"%s^" Guncel:%s",szArg1,LinePW,Flag[7],YazanIsim,sndr_name)
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
}
else
{
if(atkafasi >=1)
{
write_file(file,"",line)
formatex(szLine,511,"^"%s-%i]^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Slot-%i^" ^"%s^" // Yazan: ^"%s^" Guncel:%s ",szArg1,atkafasi-1,LinePW,Flag[atkafasi-1],atkafasi-1,TEXT,YazanIsim,sndr_name)
write_file(file,szLine,line)
renkli_yazi(id,"!t[!gTRGaming!t] Yetki Dusuruldu Yeni Hali ^"%s-%i]^" ^"%s^" ^"%s^" ^"a^" // Yazan: ^"%s^" Guncel:%s",szArg1,atkafasi-1,LinePW,Flag[atkafasi-1],YazanIsim,sndr_name)
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
}
}
}
else
{
renkli_yazi(id,"!t[!gTRGaming!t] %s isimli Kisinin isminde [S- veya [K- Bulunamadigi Icin Islem yapilmiyor!",LineName)
}
}
}
return PLUGIN_HANDLED
}
public YetkiArttir(id)
{
if(get_user_flags(id) & ADMIN_RCON)
{
new sndr_name[33]
get_user_name( id, sndr_name, 32 )
new szLine[512];
new LineName[32],LinePW[32],LineAccess[32],LineFlag[32];
new txtlen;
new blabla[4],Yazan[8],YazanIsim[32],satir1[32],satir2[32],satir3[32],satir4[4],satir5[4],satir6[4],satir7[4]
new line
line=TutIsim[id]
szLine[0] = 0;
LineName[0] = 0;
LinePW[0] = 0;
LineAccess[0] = 0;
LineFlag[0] = 0;
read_file(file,line,szLine,511,txtlen)
if(szLine[0])
{
parse(szLine,LineName,31,LinePW,31,LineAccess,31,LineFlag,31,satir1,31,satir2,31,satir3,31,satir4,3,Yazan,7,satir5,3,satir6,3,YazanIsim,31)
if(containi(LineName, "[K-A]") != -1)
{
renkli_yazi(id,"!t[!gTRGaming!t] %s isimli Kisi %s Yetkisine Erismis Daha Yukseltilemiyor",LineName,KomutcuTag[6])
return PLUGIN_HANDLED
}
else if(containi(LineName, "[S-A]") != -1)
{
renkli_yazi(id,"!t[!gTRGaming!t] %s isimli Kisi %s Yetkisine Erismis Daha Yukseltilemiyor",LineName,SlotTag[8])
return PLUGIN_HANDLED
}
new szArg1[32], szArg2[5],szArg3[5],szArg4[5]
strtok(LineName, szArg1, charsmax(szArg1), szArg2, charsmax(szArg2),'-')
strtok(szArg2, szArg4, charsmax(szArg4), szArg3, charsmax(szArg3),']')
//renkli_yazi(id,"!t[!gTRGaming!t] %i %s",str_to_num(szArg4),LineName)
new atkafasi
atkafasi = str_to_num(szArg4)
if(containi(LineName, "[K-") != -1)
{
if(atkafasi==6)
{
write_file(file,"",line)
formatex(szLine,511,"^"%s-A]^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Komutcu-Admin^" ^"%s^" // Yazan: ^"%s^" Guncel:%s ",szArg1,LinePW,FlagKom[6],TEXT,YazanIsim,sndr_name)
write_file(file,szLine,line)
renkli_yazi(id,"!t[!gTRGaming!t] Yetki Arttirildi Yeni Hali ^"%s-A]^" ^"%s^" ^"%s^" ^"a^" // Yazan: ^"%s^" Guncel:%s",szArg1,LinePW,FlagKom[6],YazanIsim,sndr_name)
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
}
else
{
write_file(file,"",line)
formatex(szLine,511,"^"%s-%i]^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Komutcu-%i^" ^"%s^" // Yazan: ^"%s^" Guncel:%s ",szArg1,atkafasi+1,LinePW,FlagKom[atkafasi+1],atkafasi+1,TEXT,YazanIsim,sndr_name)
write_file(file,szLine,line)
renkli_yazi(id,"!t[!gTRGaming!t] Yetki Arttirildi Yeni Hali ^"%s-%i]^" ^"%s^" ^"%s^" ^"a^" // Yazan: ^"%s^" Guncel:%s",szArg1,atkafasi+1,LinePW,FlagKom[atkafasi+1],YazanIsim,sndr_name)
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
}
}
else if(containi(LineName, "[S-") != -1)
{
if(atkafasi==8)
{
write_file(file,"",line)
formatex(szLine,511,"^"%s-A]^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Slot-Admin^" ^"%s^" // Yazan: ^"%s^" Guncel:%s ",szArg1,LinePW,Flag[8],TEXT,YazanIsim,sndr_name)
write_file(file,szLine,line)
renkli_yazi(id,"!t[!gTRGaming!t] Yetki Arttirildi Yeni Hali ^"%s-A]^" ^"%s^" ^"%s^" ^"a^" // Yazan: ^"%s^" Guncel:%s",szArg1,LinePW,Flag[8],YazanIsim,sndr_name)
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
}
else
{
write_file(file,"",line)
formatex(szLine,511,"^"%s-%i]^" ^"%s^" ^"%s^" ^"a^" ^"^" ^"^" ^"^" ^"Slot-%i^" ^"%s^" // Yazan: ^"%s^" Guncel:%s ",szArg1,atkafasi+1,LinePW,Flag[atkafasi+1],atkafasi+1,TEXT,YazanIsim,sndr_name)
write_file(file,szLine,line)
renkli_yazi(id,"!t[!gTRGaming!t] Yetki Arttirildi Yeni Hali ^"%s-%i]^" ^"%s^" ^"%s^" ^"a^" // Yazan: ^"%s^" Guncel:%s",szArg1,atkafasi+1,LinePW,Flag[atkafasi+1],YazanIsim,sndr_name)
server_cmd("amx_reloadadmins")
server_cmd("amx_chatreload")
}
}
else
{
renkli_yazi(id,"!t[!gTRGaming!t] %s isimli Kisinin isminde [S- veya [K- Bulunamadigi Icin Islem yapilmiyor!",LineName)
}
}
}
return PLUGIN_HANDLED
}
stock renkli_yazi(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!g", "^x04"); // Yeşil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
if (id) players[0] = id; else get_players(players, count, "ch");
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
stock admin_exists(const Name[]) {
new szLine[512];
new LineName[32],blabla[32];
new maxlines,txtlen;
maxlines = file_size(file,1);
for(new line;line<maxlines;line++) {
read_file(file,line,szLine,511,txtlen)
parse(szLine,LineName,31,blabla,31)
if(equal(LineName, Name)) {
return 1;
}
}
return 0;
}