1. sayfa (Toplam 1 sayfa)

Banka Plugini Edit

Gönderilme zamanı: Cmt Şub 10, 2018 6:33 pm
gönderen Revenqe
Arkadasalar Banka plugini var jb yatırlıp cekinmiyor para yatırılıp cekiliyor jb olarak ayarlarmisniiz .

Kod: Tümünü seç

#include <amxmodx>
#include <fun>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <xs>
#include <nvault>

new anavault;
new username[33][200]
new password[33][200]
new g_username[33][200]
new g_password[33][200]
new k_username[33][200]
new k_password[33][200]
new g_IslemUcreti
new maxjb

static const version[] = "1.0";
static const plugin[] = "JailBreak Banka Plugini";
static const author[] = "Krali43";

public plugin_init(){
	register_plugin(plugin, version, author)
	
	register_clcmd("say /banka", "login_menusu")
	register_clcmd("bankaelit", "login_menusu")
	register_clcmd("say_team /banka ", "login_menusu")
	
	anavault = nvault_open("elitBanka")
	maxjb = register_cvar("amx_maxbankajb", "100")
	register_clcmd("Hesap_Ismi","Giris_ID")
	register_clcmd("Hesap_Ismi_Secin","Kayit_ID")
	register_clcmd("Vereceginiz_Miktar","Ammo_Yatir")
	register_clcmd("Alacaginiz_Miktar","Ammo_Cek")
	register_clcmd("Sifreniz","Giris_Pw")
	register_clcmd("Sifre_Secin","Kayit_Pw")
	register_clcmd("say /banka","login_menusu")
	g_IslemUcreti = register_cvar("banka_islem_ucreti","10")
}

public plugin_cfg()
{
	nvault_prune( anavault , 0 , get_systime() - ( 3 * 86400 ) )
}

public login_menusu(id)
{
	if(!is_user_connected(id) || !is_user_alive(id)) return PLUGIN_HANDLED
	
	new banka_ismi[128],map_name[128]
	get_mapname(map_name,127)
	replace_all(map_name,127,"zm_","")
	replace_all(map_name,127,"sea_","")
	replace_all(map_name,127,"de_","")
	replace_all(map_name,127,"cs_","")
	replace_all(map_name,127,"fy_","")
	replace_all(map_name,127,"jail_","")
	replace_all(map_name,127,"some1s_","")
	
	formatex(banka_ismi,127,"RBP Halk Bankasi \r[%s] \wSubesi",map_name)
	new menu = menu_create(banka_ismi,"login_devam")
	if(equal(username[id],""))
	{
		menu_additem(menu,"Giris Yap","1",0)
		menu_additem(menu,"Kayit Ol","2",0)
	}
	else
	{
		menu_additem(menu,"Para Yatir","3",0)
		menu_additem(menu,"Para Cek","4",0)
		menu_additem(menu,"Hesap Durumu","6",0)
		menu_additem(menu,"Cikis Yap","5",0)
		
	}
	if(get_user_flags(id) & ADMIN_BAN)
	{
		menu_additem(menu,"Oyuncularin Hesaplarina Bak","7",ADMIN_BAN)
	}
	menu_setprop(menu,MPROP_EXIT,MEXIT_ALL)
	menu_display(id,menu,0)
	return PLUGIN_HANDLED
}


public login_devam(id,menu,item)
{
	
	if(!is_user_connected(id) || !is_user_alive(id)) return PLUGIN_HANDLED
	
	if(item == MENU_EXIT)
	{
		menu_destroy(menu)
		return PLUGIN_HANDLED    
	}
	
	new acces,data2[24],iname[64],callback,data
	menu_item_getinfo(menu,item,acces,data2,23,iname,63,callback)
	data = str_to_num(data2)
	
	
	
	switch(data)
	{
		
		case 1:
		{
			client_cmd(id,"messagemode Hesap_Ismi")
		}
		case 2:
		{
			client_cmd(id,"messagemode Hesap_Ismi_Secin")
		}
		case 3:
		{
			client_cmd(id,"messagemode Vereceginiz_Miktar")
		}
		case 4:
		{
			client_cmd(id,"messagemode Alacaginiz_Miktar")
		}
		case 5:
		{
			copy(username[id],199,"")
			copy(password[id],199,"")
			client_print(id,print_center,"Cikis yaptiniz..")
		}
		case 6:
		{
			set_hudmessage(255, 255, 255, 0.29, 0.30, 0, 6.0, 5.0,_,_,-1)
			show_hudmessage(id, "Hesabinizdaki Miktar : ^n %d$",get_hesap_ammo(username[id]))
		}
		case 7:
		{
			if((get_user_flags(id) & ADMIN_BAN))
			{
				new message[899],len;  
				len = formatex(message,898,"<body bgcolor=black><b>");  
				for(new i = 1; i < 33; i++)
				{
					if(is_user_connected(i))
					{
						new iName[64]
						get_user_name(i,iName,63)
						if(!equal(username[i],""))
						{
							len += formatex(message[len],898-len,"<font color=red>%s</font><font color=white> (Uzerinde %d$) - Hesapta= %d$<br></font>",iName,cs_get_user_money(i),get_hesap_ammo(username[i])) 
						}
						else
						{
							len += formatex(message[len],898-len,"<font color=red>%s</font><font color=white> (Uzerinde %d$)",iName,cs_get_user_money(i));  
						}
					}
				}
				show_motd(id,message," - Admin Takip Paneli - "); 
				
			}
		}
		
		
	}
	menu_destroy(menu)
	return PLUGIN_HANDLED
}

public Giris_ID(id)
{
	new say[300]
	read_args(say, charsmax(say))
	
	remove_quotes(say)
	
	if(equal(say, "") || !equal(username[id],"") || strlen(say) > 12)
	{
		copy(g_username[id],199,"")    
		copy(g_password[id],199,"")
		copy(k_username[id],199,"")    
		copy(k_password[id],199,"")
		return PLUGIN_HANDLED    
	}
	
	
	copy(g_password[id],199,"")
	copy(k_username[id],199,"")
	copy(k_password[id],199,"")
	copy(g_username[id],199,say)
	client_cmd(id,"messagemode Sifreniz")
	return PLUGIN_CONTINUE
	
}

public Giris_Pw(id)
{
	new say[300]
	read_args(say, charsmax(say))
	
	remove_quotes(say)
	
	if(equal(say, "") || !equal(username[id],"") || equal(g_username[id],"") || strlen(say) > 12)
	{
		copy(g_username[id],199,"")    
		copy(g_password[id],199,"")
		copy(k_username[id],199,"")    
		copy(k_password[id],199,"")
		
		return PLUGIN_HANDLED    
	}
	
	copy(g_password[id],199,say)
	giris_yap(id,g_username[id], g_password[id])
	copy(g_password[id],199,"")
	copy(g_username[id],199,"")
	copy(k_password[id],199,"")
	copy(k_username[id],199,"")
	return PLUGIN_CONTINUE
}


/////////////////////////
////#Kayit Islemleri#////
/////////////////////////

public Kayit_ID(id)
{
	new say[300]
	read_args(say, charsmax(say))
	
	remove_quotes(say)
	
	if(equal(say, "") || !equal(username[id],"") || strlen(say) > 12)
	{
		copy(g_username[id],199,"")    
		copy(g_password[id],199,"")
		copy(k_username[id],199,"")    
		copy(k_password[id],199,"")
		return PLUGIN_HANDLED
	}
	
	
	copy(k_password[id],199,"")
	copy(g_username[id],199,"")
	copy(g_password[id],199,"")
	copy(k_username[id],199,say)
	client_cmd(id,"messagemode Sifre_Secin")
	return PLUGIN_CONTINUE
	
}

public Kayit_Pw(id)
{
	new say[300]
	read_args(say, charsmax(say))
	
	remove_quotes(say)
	
	if(equal(say, "") || !equal(username[id],"") || equal(k_username[id],"") || strlen(say) > 12)
	{
		copy(g_username[id],199,"")    
		copy(g_password[id],199,"")
		copy(k_username[id],199,"")    
		copy(k_password[id],199,"")
		return PLUGIN_HANDLED
	}
	
	copy(k_password[id],199,say)
	kayit_yap(id,k_username[id], k_password[id])
	copy(g_password[id],199,"")
	copy(g_username[id],199,"")
	copy(k_password[id],199,"")
	copy(k_username[id],199,"")
	return PLUGIN_CONTINUE
}

///////////////////////////
///////////////////////////



public giris_yap(id,userid[],psw[])
{
	if(!is_user_connected(id) || equal(userid,"") || equal(psw,"") || !equal(username[id],""))
		return PLUGIN_HANDLED
	
	new getPw[32], IDFormat[64]
	formatex(IDFormat,63,"%s-ID",userid)
	nvault_get(anavault,IDFormat,getPw,31)
	if(equali(psw,getPw))
	{
		copy(username[id],199,userid)
		copy(password[id],199,psw)
		client_print(id,print_chat,"Hesabiniza basariyla giris yapildi. Su anda %d$ depoluyorsunuz!",get_hesap_ammo(userid))
	}
	else
	{
		client_print(id,print_center,"Yanlis hesap ismi veya sifre !")    
	}
	return PLUGIN_HANDLED
}



public kayit_yap(id,userid[],psw[])
{
	if(!is_user_connected(id) || equal(userid,"") || equal(psw,"") || !equal(username[id],""))
		return PLUGIN_HANDLED
	
	new getPw[32], IDFormat[64]
	formatex(IDFormat,63,"%s-ID",userid)
	nvault_get(anavault,IDFormat,getPw,31)
	if(equali(getPw,""))
	{
		copy(username[id],199,userid)
		copy(password[id],199,psw)
		new ammoKey[64], hesapKey[64]
		formatex(hesapKey,63,"%s-ID",userid)
		formatex(ammoKey,63,"%s-TL",userid)
		nvault_set(anavault,hesapKey,psw)
		nvault_set(anavault,ammoKey,"0")
		client_print(id,print_chat,"Hesabinizi kaydettik.Islemler icin ^"/banka^" yazin..")
		client_print(id,print_chat,"Hesap adi = %s   Sifreniz = %s",userid,psw)
	}
	else
	{
		client_print(id,print_center,"Bu hesap zaten kayitlarda var..")    
	}
	return PLUGIN_HANDLED
}


public Ammo_Yatir(id)
{
	new say[300]
	read_args(say, charsmax(say))
	
	remove_quotes(say)
	
	if(!is_str_num(say) || equal(say, "") || equal(username[id],"") || strlen(say) > 12)
		return PLUGIN_HANDLED
	
	if(cs_get_user_money(id) < str_to_num(say))
	{
		client_print(id,print_center,"Transfer Islemi Icin Yeterli Nakite Sahip Degilsiniz")    
		return PLUGIN_HANDLED
	}
	
	if(get_hesap_ammo(username[id]) + str_to_num(say) > get_pcvar_num(maxjb))
	{
		client_print(id,print_center,"Hesabinizda %i$'Dan Fazla Para Depolayamazsiniz :)",get_pcvar_num(maxjb))
		return PLUGIN_HANDLED
	}
	
	cs_set_user_money(id,cs_get_user_money(id) - (str_to_num(say) + get_pcvar_num(g_IslemUcreti)))
	set_hesap_ammo(username[id],get_hesap_ammo(username[id]) + str_to_num(say))
	client_print(id,print_center,"Hesabiniza %d$ Transfer Edildi..",str_to_num(say))
	return PLUGIN_HANDLED
}

public Ammo_Cek(id)
{
	new say[300],nameee[33]
	read_args(say, charsmax(say))
	
	remove_quotes(say)
	
	if(!is_str_num(say) || equal(say, "") || equal(username[id],"") || strlen(say) > 12)
		return PLUGIN_HANDLED
	
	if(get_hesap_ammo(username[id]) < str_to_num(say))
	{
		client_print(id,print_center,"Hesabinizda Yeterli Para Yok..!")    
		return PLUGIN_HANDLED
	}
	
	if(get_hesap_ammo(username[id]) > 100000)
	{
		get_user_name(id,nameee,31)
		set_hesap_ammo(username[id],100000)
		client_print(0,print_center,"%s Adli Kisinin Hesabi Patladi :D",nameee)
		return PLUGIN_HANDLED
	}
	
	cs_set_user_money(id,cs_get_user_money(id) + str_to_num(say))
	set_hesap_ammo(username[id],get_hesap_ammo(username[id]) - str_to_num(say))
	client_print(id,print_center,"Hesabinizdan %d$ Cektiniz..",str_to_num(say))
	return PLUGIN_HANDLED
}

public get_hesap_ammo(userid[])
{
	new gData[64], gAmmoKey[64]
	formatex(gAmmoKey,63,"%s-TL",userid)
	nvault_get(anavault,gAmmoKey,gData,63)
	return str_to_num(gData)
}

public set_hesap_ammo(userid[],miktar)
{
	new gAmmoKey[64], miktar2[128]
	num_to_str(miktar,miktar2,127)
	formatex(gAmmoKey,63,"%s-TL",userid)
	nvault_set(anavault,gAmmoKey,miktar2)
	return 1
}

Banka Plugini Edit

Gönderilme zamanı: Cmt Şub 10, 2018 7:27 pm
gönderen ToyBaby
Bu plugini ben ayarlayamam ancak piyasada jb ile çalışan banka pluginleri var bulabilirsin forumdada gerekirse google'de da , ancak ben yinede bunun hakkında bilgisi olanları ekleyeyim :D
@PaZee
@Yek'ta

Banka Plugini Edit

Gönderilme zamanı: Cmt Şub 10, 2018 7:40 pm
gönderen Poseidon*
Buyur "jb_get_user_packs" ve "jb_set_user_packs" olarak değiştim ama denemedim deneyip söyleyiniz.