Modificare Plugin Reclama pe Pereti

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
R0tty
Membru, skill 0
Membru, skill 0
Posts: 76
Joined: 16 Aug 2009, 21:28
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Been thanked: 1 time

22 Mar 2020, 13:54

Salut all
Am acest sma de mai jos , luat de pe net , care imi da posibilitatea sa pun reclama pe pereti in orice harta cu DNS meu .
Din nefericire acest sma are erori la compilare , mai anume

// D:\Salvari 03.05.2017\Server\addon\addons\amxmodx\scripting\LCS_Reklam.sma(207) : error 017: undefined symbol "client_print_color"
// D:\Salvari 03.05.2017\Server\addon\addons\amxmodx\scripting\LCS_Reklam.sma(207) : warning 215: expression has no effect
// D:\Salvari 03.05.2017\Server\addon\addons\amxmodx\scripting\LCS_Reklam.sma(207) : error 001: expected token: ";", but found ")"
// D:\Salvari 03.05.2017\Server\addon\addons\amxmodx\scripting\LCS_Reklam.sma(207) : error 029: invalid expression, assumed zero
// D:\Salvari 03.05.2017\Server\addon\addons\amxmodx\scripting\LCS_Reklam.sma(207) : fatal error 107: too many error messages on one line

De aceea rog pe cine se pricepe sa ma ajute , sa-mi elimine acele erori.
Multumesc Anticipat.

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>

#define PLUGIN "CSD Reklam Eklentisi"
#define VERSION "1.0"
#define AUTHOR "Fatih ~ EjderYa"

#define AYAR_YETKISI ADMIN_RCON

#define MODEL "sprites/CSD_Reklam.spr"
#define REKLAM_SINIF_ISIMLERI "Otomatik_Reklam"
#define DOSYA_UZANTISI "ini"

#define SABIT_SAYILAR "213.238.173"
#define PORT "27015"

#define REKLAM_SINIRI 5

new REKLAM_KIMLIKLERI[REKLAM_SINIRI][5]
new REKLAM_Goruntuleri[REKLAM_SINIRI][3]

new IP[32] , IP_Sonu[4] , Basamak_Sayisi , MenuAcikligi[33] , ReklamEnt[33][5] , sunucu_kapasitesi , Mesaj_Stili , KayitDosyaYolu[250] , IP_net , STIL , Renk , Buyukluk = 5 , laser

new const Float:Renkler[][3] =
	{
	//	R	G	B
		{255.0,	255.0,	255.0},	// 0
		{255.0,	255.0,	0.0},	// 1
		{255.0,	195.0,	0.0},	// 2
		{255.0,	143.0,	0.0},	// 3
		{255.0,	91.0,	4.0},	// 4
		{255.0,	9.0,	19.0},	// 5
		{220.0,	8.0,	158.0},	// 6
		{166.0,	26.0,	166.0},	// 7
		{111.0,	37.0,	167.0},	// 8
		{0.0,	122.0,	218.0},	// 9
		{0.0,	122.0,	67.0},	// 10
		{0.0,	184.0,	74.0},	// 11
		{128.0,	128.0,	128.0},	// 12
		{132.0,	208.0,	32.0}	// 13
		
}
new const Stiller[11] = { 0 , 3 , 4 , 9 , 10 , 11 , 12 , 13 , 15 , 16 , -1 }
	
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("amx_reklammenu","ReklamMenu")
	
	sunucu_kapasitesi = get_maxplayers() + 1
	Mesaj_Stili = get_user_msgid("BarTime")
	
	new Harita_Ismi[32]
	get_mapname(Harita_Ismi,charsmax(Harita_Ismi))
	strtolower(Harita_Ismi)
	get_configsdir(KayitDosyaYolu,charsmax(KayitDosyaYolu));
	formatex(KayitDosyaYolu,charsmax(KayitDosyaYolu),"%s/reklam_%s.%s",KayitDosyaYolu,Harita_Ismi,DOSYA_UZANTISI);
	
	Ip_Sonu_Bul()
	set_task(3.0,"KayitliReklamlariYukle")
}

public EnKisaMesafeyiBul(id){

	new Oyuncu_Nisani[3]
	get_user_origin(id,Oyuncu_Nisani,3)
	
	new En_Yakin_Katman = -1 , Float:Uzaklik
	
	for ( new x ; x < REKLAM_SINIRI ; x++ ){
	
		if ( pev_valid(REKLAM_KIMLIKLERI[x][2])){
			
			new Float:Nesne_Konumu[3]
			pev(REKLAM_KIMLIKLERI[x][2],pev_origin,Nesne_Konumu)
			
			new Float:n_Uzaklik = floatpower(floatpower(float(Oyuncu_Nisani[0]) - Nesne_Konumu[0],2.0)+floatpower(float(Oyuncu_Nisani[1]) - Nesne_Konumu[1],2.0)+floatpower(float(Oyuncu_Nisani[2]) - Nesne_Konumu[2],2.0),0.5)
			if ( n_Uzaklik < Uzaklik || Uzaklik == 0 ){
			
				Uzaklik = n_Uzaklik
				En_Yakin_Katman = x
				
				
			}
			
	
		}
	
	}
	
				
	if ( En_Yakin_Katman != -1 )
		Lazer_Olustur(id,REKLAM_KIMLIKLERI[En_Yakin_Katman][2])

	
	return En_Yakin_Katman
}
public Lazer_Olustur(id,Nesne){

	new Float:Oyuncu_Konumu[3] , Float:Nesne_Konumu[3]
	pev(id,pev_origin,Oyuncu_Konumu)
	pev(Nesne,pev_origin,Nesne_Konumu)
	
	message_begin(MSG_ONE_UNRELIABLE ,SVC_TEMPENTITY,{0,0,0},id) //message begin
	write_byte(0)
	write_coord(floatround( Oyuncu_Konumu[0])) /// Start possion
	write_coord(floatround( Oyuncu_Konumu[1]))
	write_coord(floatround( Oyuncu_Konumu[2]))
	write_coord(floatround( Nesne_Konumu[0]) ) /// End possion
	write_coord(floatround( Nesne_Konumu[1]) )
	write_coord(floatround( Nesne_Konumu[2]) )
	write_short(laser) // sprite index
	write_byte(3) // starting frame
	write_byte(0) // frame rate in 0.1's
	write_byte(1) // life in 0.1's
	write_byte(5) // line width in 0.1's
	write_byte(0) // noise amplitude in 0.01's
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(125) // brightness)
	write_byte(0) // scroll speed in 0.1's
	message_end()

	return PLUGIN_HANDLED
}


public client_PreThink(id){

	if ( MenuAcikligi[id] != 0 ){
		
		if( pev_valid(ReklamEnt[id][0]) ) {
			
			ReklamYazisiniOlustur(id,id)
			EnKisaMesafeyiBul(id)
			

		}
	}
}



public ReklamMenu(id){
	
	if( access(id,AYAR_YETKISI) ){

		new ReklamAdeti = Reklam_Adeti_Ogren()

		new Yazi[86] = "\r*** \wCSDuragi Dinamik Reklam Menu \r***"
		
		formatex(Yazi,charsmax(Yazi),"%s ^n^n\rREKLAM SINIRI : \r%d/%d",Yazi,ReklamAdeti,REKLAM_SINIRI)
		
		new menu = menu_create(Yazi, "ReklamMenu_Devam")
		
		menu_additem(menu , "Sureyi Yenile", "1")
		
		if ( ReklamAdeti < REKLAM_SINIRI )
			menu_additem(menu , "Reklami Yerlestir", "2")
		else	menu_additem(menu , "\dReklami Yerlestir", "1")
		
		if ( ReklamAdeti <= 0 ){
			menu_additem(menu , "\dReklami Kaldir", "1")
			menu_additem(menu , "\dTum Reklamlari Kaldir^n", "1")
		}
		else
		{
			menu_additem(menu , "Reklami Kaldir", "3")
			menu_additem(menu , "Tum Reklamlari Kaldir^n", "7")
		}
		
		formatex(Yazi,charsmax(Yazi),"Stil : \r%d/11",STIL+1)
		menu_additem(menu , Yazi, "4")
		
		
		formatex(Yazi,charsmax(Yazi),"Renk : \r%d/15",Renk+1)
		menu_additem(menu , Yazi, "5")
		
		formatex(Yazi,charsmax(Yazi),"Buyukluk : \r%d/10",Buyukluk)
		menu_additem(menu , Yazi, "6")
		
	
		menu_setprop(menu,MPROP_EXITNAME,"Cikis")
		menu_setprop(menu,MPROP_EXIT, MEXIT_NORMAL)
		
		menu_display(id,menu)
		
		
		if ( MenuAcikligi[id] == 0 ){
			MenuAcikligi[id] = 5
			Menu_Acikligi_Algila(id)
			
			if ( !pev_valid(ReklamEnt[id][0]) || pev_valid(ReklamEnt[id][0]) == -1 )
				ReklamYazisiniOlustur(id,0)
		}
		else MenuAcikligi[id] = 5
		
		Cubuk_Olustur(id,MenuAcikligi[id])
		StilDegis(id,STIL)
		RenkDegis(id,Renk)
		
	}
	else client_print_color(id,print_team_default,"^4Reklam Menu^1yu Acmak Icin Yeterli Yetkiye Sahip Degilsiniz !")
	return PLUGIN_HANDLED
	
	
}
public ReklamMenu_Devam(id, Menu , item){
	new data[6], iName[64]
	new acces, callback
	menu_item_getinfo(Menu, item, acces, data,5, iName, 63, callback)
	
	switch(str_to_num(data)){
		
		
		case 2 : {
			
			ReklamiYerlestir(id,Renk,STIL,Buyukluk) , MenuAcikligi[id] = 0
		
		}
		
		case 3 : {
			
			Reklam_Kimligi_Kaldir(EnKisaMesafeyiBul(id))
		
		}
		
		case 4 : {
			
			if ( STIL >= 10 ) STIL = 0
			else STIL += 1
			
			StilDegis(id,STIL)
		
		}
		
		case 5 : {
			
			if ( Renk > 13 ) Renk = 0
			else Renk += 1
			
			RenkDegis(id,Renk)
			
		}
		
		case 6 : {
			
			if ( Buyukluk >= 10 ) Buyukluk = 1
			else Buyukluk += 1
			
		}
		
		case 7 : {
			
			for ( new i ; i < REKLAM_SINIRI ; i ++ )
				Reklam_Kimligi_Kaldir(i)
			
		}
		
	}
	
	
	if( !(str_to_num(data) == 0 || str_to_num(data) == 2) ) ReklamMenu(id)
	else ReklamEnt_Kaldir(id) , Cubuk_Olustur(id,0)
	
}
public BosKatmanBul(){
	
	new Bos_Katman = -1
	for ( new i ; i < REKLAM_SINIRI ; i++){

		if ( !pev_valid(REKLAM_KIMLIKLERI[0])){
				Bos_Katman = i
				break
		}
		
	}
	
	return Bos_Katman
	
	
}
public Reklam_Kimligi_Kaldir(KATMAN){

	if ( KATMAN >= 0 && KATMAN < REKLAM_SINIRI ){
		for ( new i ; i < 5 ; i++ ){
		
			if ( pev_valid(REKLAM_KIMLIKLERI[KATMAN])){
				
				remove_entity(REKLAM_KIMLIKLERI[KATMAN])
				REKLAM_KIMLIKLERI[KATMAN] = 0
				
				
			}
			
			
		}
		
		
		write_file(KayitDosyaYolu,"",KATMAN)
			
	}
}
public ReklamiYerlestir(id,xRenk,xStil,xBuyukluk){
	
	if ( MenuAcikligi[id] != 0 ){
		new Bos_Katman = BosKatmanBul()
		
		if ( Bos_Katman != -1 ){
		
			for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
			
				if ( pev_valid(ReklamEnt[id])){
					
					REKLAM_KIMLIKLERI[Bos_Katman] = ReklamEnt[id]
					ReklamEnt[id] = -1
					
				}
			}
			
			REKLAM_Goruntuleri[Bos_Katman][0] = xRenk
			REKLAM_Goruntuleri[Bos_Katman][1] = xStil
			REKLAM_Goruntuleri[Bos_Katman][2] = xBuyukluk
			
			new Float:Konum[3] , Float:Aci[3] , Yazi[64]
			KonumAciHesapla(id,Konum,Aci)
			formatex(Yazi,charsmax(Yazi),"%.1f %.1f %.1f %.1f %.1f %.1f %d %d %d",Konum[0],Konum[1],Konum[2],Aci[0],Aci[1],Aci[2],REKLAM_Goruntuleri[Bos_Katman][0],REKLAM_Goruntuleri[Bos_Katman][1],xBuyukluk)
			write_file(KayitDosyaYolu,Yazi,Bos_Katman)
		}
	}
}

public KayitliReklamlariYukle(){

	new satir_sayisi = file_size(KayitDosyaYolu, FSOPT_LINES_COUNT) - 1
	 
	if ( file_size(KayitDosyaYolu) == -1 ){
		
		new Harita_Ismi[32]
		get_mapname(Harita_Ismi,charsmax(Harita_Ismi))
		strtolower(Harita_Ismi)
		
		if ( equali(Harita_Ismi,"de_dust2" ) ){
			
			write_file(KayitDosyaYolu,"-2091.5 1825.1 17.2 32.4 198.4 0.0 0 9 3",0)
			write_file(KayitDosyaYolu,"384.0 2048.5 9.0 0.0 270.0 0.0 14 2 5",1)
			write_file(KayitDosyaYolu,"-501.0 -448.5 144.0 0.0 450.0 0.0 14 2 3",2)
			write_file(KayitDosyaYolu,"1280.5 1512.0 115.0 0.0 180.0 0.0 14 9 5",3)
			
			set_task(5.0,"KayitliReklamlariYukle")
			return PLUGIN_HANDLED
		}
		else satir_sayisi = 0
		
	 
		
	}

	if ( satir_sayisi < REKLAM_SINIRI ){
		for ( new i = satir_sayisi ; i < REKLAM_SINIRI ; i++ ){
			write_file(KayitDosyaYolu,"",-1)
		}
		satir_sayisi = file_size(KayitDosyaYolu, FSOPT_LINES_COUNT) - 1
	}
	else if ( satir_sayisi != REKLAM_SINIRI ){
		delete_file(KayitDosyaYolu)
		KayitliReklamlariYukle()
		return PLUGIN_HANDLED
	}
	
			
	
	
	for(new i;i < satir_sayisi;i++) {
			
		new Yazi[64]
			
		read_file(KayitDosyaYolu,i,Yazi,charsmax(Yazi))
		if ( !equali(Yazi,"") ){
	
			new Konum_x[9] , Konum_y[9] , Konum_z[9]
			new Aci_x[9] , Aci_y[9] , Aci_z[9]
			new xRenk[4] , xStil[4] , xBuyukluk[4]
			
			parse(Yazi,Konum_x,charsmax(Konum_x),Konum_y,charsmax(Konum_y),Konum_z,charsmax(Konum_z),Aci_x,charsmax(Aci_x),Aci_y,charsmax(Aci_y),Aci_z,charsmax(Aci_z),xRenk,charsmax(xRenk),xStil,charsmax(xStil),xBuyukluk,charsmax(xBuyukluk))
				
			REKLAM_Goruntuleri[0] = str_to_num(xRenk)
			REKLAM_Goruntuleri[1] = str_to_num(xStil)
			REKLAM_Goruntuleri[i][2] = str_to_num(xBuyukluk)
				
				
			new Float:Konum[3]
			Konum[0] = str_to_float(Konum_x)
			Konum[1] = str_to_float(Konum_y)
			Konum[2] = str_to_float(Konum_z)
		
			new Float:Aci[3]
			Aci[0] = str_to_float(Aci_x)
			Aci[1] = str_to_float(Aci_y)
			Aci[2] = str_to_float(Aci_z)
				
			Hedefe_Yazdir(Konum,Aci,-1,REKLAM_Goruntuleri[i][2])
				
			RenkDegis(0,REKLAM_Goruntuleri[i][0])
			StilDegis(0,REKLAM_Goruntuleri[i][1])
				
				
			for ( new j ; j < Basamak_Sayisi + 2 ; j++ ){
			
				if ( pev_valid(ReklamEnt[0][j])){
						
					REKLAM_KIMLIKLERI[i][j] = ReklamEnt[0][j]
					ReklamEnt[0][j] = -1
						
				}
			}
		}
	
		

	
		StilveRenk_Rastegle_Tekrari()
	
	}

	return PLUGIN_CONTINUE
}

public StilveRenk_Rastegle_Tekrari(){


	for ( new x ; x < REKLAM_SINIRI ; x++ ){
	
	
		if ( REKLAM_Goruntuleri[x][0] == 14 ){
		
		
		
		
			for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
				if ( pev_valid(REKLAM_KIMLIKLERI[x][i])){
					new Katman = random_num(0,13)
					if ( i == 1 ){
						for ( new j = 1 ; j <= Basamak_Sayisi ; j++ )
							set_pev(REKLAM_KIMLIKLERI[x][j],pev_rendercolor , Renkler[Katman])
						
						i += Basamak_Sayisi - 1
					}
					else set_pev(REKLAM_KIMLIKLERI[x][i],pev_rendercolor , Renkler[Katman])
				}
				else
				{
					REKLAM_Goruntuleri[x][0] = 0
					break
				}
			}
		
		
		
		
		
		}
	
	
	
		
	
		if ( REKLAM_Goruntuleri[x][1] == 10 ){
		
		
		
		
			for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
				if ( pev_valid(REKLAM_KIMLIKLERI[x][i])){
			
					new Katman = random_num(1,9)
					
					if ( i == 1 ){
						for ( new j = 1 ; j <= Basamak_Sayisi ; j++ )
							set_pev(REKLAM_KIMLIKLERI[x][j],pev_renderfx,Stiller[Katman])
						
						i += Basamak_Sayisi - 1
					}
					else set_pev(REKLAM_KIMLIKLERI[x][i],pev_renderfx,Stiller[Katman])
					
				}
				else
				{
					REKLAM_Goruntuleri[x][1] = 0
					break
				}
			}
		
		
		
		
		
		}
	
	
	
	}



	set_task(random_float(2.0,30.0),"StilveRenk_Rastegle_Tekrari")



}


public RenkDegis(id,_RENK){
	
	for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
	
		if ( pev_valid(ReklamEnt[id][i])){
			
			new Katman
			if ( _RENK == 14 )
				Katman = random_num(0,13)
			else	Katman = _RENK
			
			if ( i == 1 ){
				for ( new j = 1 ; j <= Basamak_Sayisi ; j++ )
					set_pev(ReklamEnt[id][j],pev_rendercolor , Renkler[Katman])
				
				i += Basamak_Sayisi - 1
			}
			else set_pev(ReklamEnt[id][i],pev_rendercolor , Renkler[Katman])
			
			
		}
		
	}

}

public StilDegis(id,_STIL){
	
	for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
	
		if ( pev_valid(ReklamEnt[id][i])){
			
			new Katman
			if ( Stiller[_STIL] == -1 )
				Katman = random_num(1,9)
			else	Katman = _STIL
			
			if ( i == 1 ){
				for ( new j = 1 ; j <= Basamak_Sayisi ; j++ )
					set_pev(ReklamEnt[id][j],pev_renderfx,Stiller[Katman])
				
				i += Basamak_Sayisi - 1
			}
			else set_pev(ReklamEnt[id][i],pev_renderfx,Stiller[Katman])
			
		}
			
			
	}
	

}
public Float:KonumAciHesapla(id,Float:vCenter_Origin[3],Float:Angles[3]){


	new Center_Origin[3];
	new Float:vNormal[3];
	get_user_origin(id, Center_Origin, 3);
	IVecFVec(Center_Origin, vCenter_Origin);
	new Float:vPlayerCenter_Origin[3];
	new Float:vViewOfs[3];
	entity_get_vector(id, EV_VEC_origin, vPlayerCenter_Origin);
	entity_get_vector(id, EV_VEC_view_ofs, vViewOfs);
	vPlayerCenter_Origin[0] += vViewOfs[0];
	vPlayerCenter_Origin[1] += vViewOfs[1];
	vPlayerCenter_Origin[2] += vViewOfs[2];
	new Float:Player_Aim[3];
	entity_get_vector(id, EV_VEC_v_angle, Angles);
	Player_Aim[0] = vPlayerCenter_Origin[0] + floatcos(Angles[1], degrees ) * 9999.9	
	Player_Aim[1] = vPlayerCenter_Origin[1] + floatsin(Angles[1], degrees) * 9999.9	
	Player_Aim[2] = vPlayerCenter_Origin[2] + floatsin(-Angles[0], degrees) * 9999.9	
	trace_normal(id, vPlayerCenter_Origin, Player_Aim, vNormal);
	vector_to_angle(vNormal, Angles)
	Angles[1] += 180.0
	
	
	vCenter_Origin[0] += (vNormal[0] * 0.5);
	vCenter_Origin[1] += (vNormal[1] * 0.5);
	vCenter_Origin[2] += (vNormal[2] * 0.5);


	return vCenter_Origin,Angles
	
}

public ReklamYazisiniOlustur(id,Oteleme){
	
	new Float:vCenter_Origin[3];
	new Float:Angles[3];
	
	KonumAciHesapla(id,vCenter_Origin,Angles)
	
	if ( Oteleme == 0 )
		Oteleme = id * sunucu_kapasitesi
	
	Hedefe_Yazdir(vCenter_Origin,Angles,Oteleme,Buyukluk)
	
	return PLUGIN_CONTINUE
	
}
public Hedefe_Yazdir(Float:Konum[3],Float:Aci[3],id,int_Buyukluk){
	
	for ( new i ; i < 3 ; i++ ){
	
		new Katman , Float: _Buyukluk = float(int_Buyukluk) / 16.6
		
		if ( i == 0 ) Katman = 10
		else 
		{	
			if ( i == 1 ){
				_Buyukluk = float(int_Buyukluk) / 12.5
			
				for ( new j ; j < Basamak_Sayisi ; j++ ){
				
					Katman = IP_Sonu[j]
					Konum[0] += floatcos(Aci[1]-90.0,degrees) * _Buyukluk * 45.0
					Konum[1] += floatsin(Aci[1]-90.0,degrees) * _Buyukluk * 45.0
					Nesneyi_Olustur(Konum,Aci,_Buyukluk,Katman,id)
					
				}
				
			}
			else
			{
				if ( IP_net == 0 )
					Katman = 11
				else	Katman = 12
				Konum[0] += floatcos(Aci[1]-90.0,degrees) * _Buyukluk * 230.0
				Konum[1] += floatsin(Aci[1]-90.0,degrees) * _Buyukluk * 230.0
				
			}
			
		}
		

		
	
		if ( i != 1 ) Nesneyi_Olustur(Konum,Aci,_Buyukluk,Katman,id)
	
		
		
	}

	
}

new Olusum_Katmani
public Nesneyi_Olustur(Float:Konum[3],Float:Aci[3],Float:Buyukluk,Katman,id){

	new Nesne
	
	if ( id >= sunucu_kapasitesi || id == -1){
		if ( id == -1 ) id = 0
		else id /= sunucu_kapasitesi
		Nesne = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "env_sprite" ) )
		ReklamEnt[id][Olusum_Katmani] = Nesne
		
		if(pev_valid(Nesne)){
			
			set_pev( Nesne, pev_origin, Konum )
			set_pev( Nesne, pev_angles, Aci )
			set_pev( Nesne, pev_scale , Buyukluk )
			set_pev( Nesne, pev_frame , float(Katman) )
			set_pev( Nesne, pev_rendermode, kRenderTransAdd )
			set_pev( Nesne, pev_renderamt, 255.0)
				
			engfunc( EngFunc_SetModel, Nesne, MODEL )
			set_pev( Nesne,pev_classname,REKLAM_SINIF_ISIMLERI )
			
		}
	}
	else	Nesne = ReklamEnt[id][Olusum_Katmani]
	
	if(pev_valid(Nesne)){
			
		set_pev( Nesne, pev_origin, Konum )
		set_pev( Nesne, pev_angles, Aci )
		set_pev( Nesne, pev_scale , Buyukluk )
			
	}
	
	Olusum_Katmani += 1
	if ( Olusum_Katmani >= Basamak_Sayisi + 2 ) Olusum_Katmani = 0
}


public Ip_Sonu_Bul(){

	get_user_ip(0 , IP , charsmax(IP) )
	Basamak_Sayisi = 0
	
	if ( contain(IP, SABIT_SAYILAR) == 0 )
		for ( new i = 12 ; i < contain(IP, PORT) - 1 ; i++ ){
			new Sayi[2]
			formatex(Sayi,charsmax(Sayi),"%c",IP[i])
			IP_Sonu[i-12] = str_to_num(Sayi)
			Basamak_Sayisi++
		}
	
	IP_net = ( IP_Sonu[0] * 100 ) + ( IP_Sonu[1] * 10 ) + IP_Sonu[2]
	if (  IP_net > 200 && IP_net < 217 ){
		
		IP_net -= 200
		
		if ( IP_net < 10 ){
			IP_Sonu[0] = IP_Sonu[2]
			Basamak_Sayisi = 1
			
		}
		else
		{
			IP_Sonu[0] = IP_Sonu[1]
			IP_Sonu[1] = IP_Sonu[2]
			Basamak_Sayisi = 2
		}
		
		
		IP_net = 1
	}
	else	IP_net = 0
	
	
}


public plugin_precache(){
	precache_model(MODEL)
	laser = precache_model("sprites/laserbeam.spr")
}


public Menu_Acikligi_Algila(id){
	
	if ( MenuAcikligi[id] != 0 ){
		
		MenuAcikligi[id] -= 1
		set_task(1.0,"Menu_Acikligi_Algila",id)
		
		
	}
	else ReklamEnt_Kaldir(id)
	
}
public ReklamEnt_Kaldir(id){

	for ( new i ; i < 5 ; i++ ){

		if ( pev_valid(ReklamEnt[id][i]))
			remove_entity(ReklamEnt[id][i])
			
		ReklamEnt[id][i] = 0
			
	}

}
public Reklam_Adeti_Ogren(){

	new Adet
	for ( new i ; i < REKLAM_SINIRI ; i++ ){
	
	
		if ( pev_valid(REKLAM_KIMLIKLERI[i][0]))
			Adet++
	
	
	}



	return Adet

}
stock Cubuk_Olustur(id, Cubugun_Dolma_Suresi) {
	message_begin(MSG_ONE, Mesaj_Stili, _, id)
	write_short(Cubugun_Dolma_Suresi)
	message_end()
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/

RoyalServer
R0tty
Membru, skill 0
Membru, skill 0
Posts: 76
Joined: 16 Aug 2009, 21:28
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Been thanked: 1 time

24 Mar 2020, 18:11

Chiar nu ma poate ajuta nimeni sa rezolv aceasta eroare ?
Platesc Deranjul fratilor , cat ma costa ?
User avatar
eMeKa.eXe
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 717
Joined: 12 Jan 2016, 03:59
Detinator Steam: Da
Reputatie: Nume anterior: SkeletoN2016
Fost Membru Club eXtreamCS (2 luni)
Fond eXtream: 0
Has thanked: 7 times
Been thanked: 28 times

24 Mar 2020, 18:37

R0tty wrote:
24 Mar 2020, 18:11
Chiar nu ma poate ajuta nimeni sa rezolv aceasta eroare ?
Platesc Deranjul fratilor , cat ma costa ?
Lasă sursa cod sma sa testăm și noi cum vrei sa îți rezolvam?dacă nu lași sursa
NEXT LEVEL
Image
User avatar
trekA
eXtream Mod
eXtream Mod
Posts: 581
Joined: 09 Mar 2019, 23:13
Detinator Steam: Da
CS Status: know no better
SteamID: picanetu
Reputatie: eXtream Mod
Membru Club eXtreamCS (17 Feb - 17 Mai)
Fond eXtream: 0
Location: Piatra Neamț
Has thanked: 134 times
Been thanked: 36 times
Contact:

24 Mar 2020, 20:23

eMeKa.eXe wrote:
24 Mar 2020, 18:37
R0tty wrote:
24 Mar 2020, 18:11
Chiar nu ma poate ajuta nimeni sa rezolv aceasta eroare ?
Platesc Deranjul fratilor , cat ma costa ?
Lasă sursa cod sma sa testăm și noi cum vrei sa îți rezolvam?dacă nu lași sursa
Ai sursa in primul post..
Last edited by levin on 24 Mar 2020, 20:24, edited 1 time in total.
Reason: :)))
R0tty
Membru, skill 0
Membru, skill 0
Posts: 76
Joined: 16 Aug 2009, 21:28
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Been thanked: 1 time

24 Mar 2020, 20:24

Man ce ai ?
Am lasat-o la Afiseaza Codul

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>

#define PLUGIN "LCS Reklam"
#define VERSION "1.0"
#define AUTHOR "Fatih ~ EjderYa"

#define AYAR_YETKISI ADMIN_RCON

#define MODEL "sprites/LCS_Reklam.spr"
#define REKLAM_SINIF_ISIMLERI "Otomatik_Reklam"
#define DOSYA_UZANTISI "ini"

#define SABIT_SAYILAR "213.238.173"
#define PORT "27015"

#define REKLAM_SINIRI 5

new REKLAM_KIMLIKLERI[REKLAM_SINIRI][5]
new REKLAM_Goruntuleri[REKLAM_SINIRI][3]

new IP[32] , IP_Sonu[4] , Basamak_Sayisi , MenuAcikligi[33] , ReklamEnt[33][5] , sunucu_kapasitesi , Mesaj_Stili , KayitDosyaYolu[250] , IP_net , STIL , Renk , Buyukluk = 5 , laser

new const Float:Renkler[][3] =
	{
	//	R	G	B
		{255.0,	255.0,	255.0},	// 0
		{255.0,	255.0,	0.0},	// 1
		{255.0,	195.0,	0.0},	// 2
		{255.0,	143.0,	0.0},	// 3
		{255.0,	91.0,	4.0},	// 4
		{255.0,	9.0,	19.0},	// 5
		{220.0,	8.0,	158.0},	// 6
		{166.0,	26.0,	166.0},	// 7
		{111.0,	37.0,	167.0},	// 8
		{0.0,	122.0,	218.0},	// 9
		{0.0,	122.0,	67.0},	// 10
		{0.0,	184.0,	74.0},	// 11
		{128.0,	128.0,	128.0},	// 12
		{132.0,	208.0,	32.0}	// 13
		
}
new const Stiller[11] = { 0 , 3 , 4 , 9 , 10 , 11 , 12 , 13 , 15 , 16 , -1 }
	
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("amx_reklammenu","ReklamMenu")
	
	sunucu_kapasitesi = get_maxplayers() + 1
	Mesaj_Stili = get_user_msgid("BarTime")
	
	new Harita_Ismi[32]
	get_mapname(Harita_Ismi,charsmax(Harita_Ismi))
	strtolower(Harita_Ismi)
	get_configsdir(KayitDosyaYolu,charsmax(KayitDosyaYolu));
	formatex(KayitDosyaYolu,charsmax(KayitDosyaYolu),"%s/reklam_%s.%s",KayitDosyaYolu,Harita_Ismi,DOSYA_UZANTISI);
	
	Ip_Sonu_Bul()
	set_task(3.0,"KayitliReklamlariYukle")
}

public EnKisaMesafeyiBul(id){

	new Oyuncu_Nisani[3]
	get_user_origin(id,Oyuncu_Nisani,3)
	
	new En_Yakin_Katman = -1 , Float:Uzaklik
	
	for ( new x ; x < REKLAM_SINIRI ; x++ ){
	
		if ( pev_valid(REKLAM_KIMLIKLERI[x][2])){
			
			new Float:Nesne_Konumu[3]
			pev(REKLAM_KIMLIKLERI[x][2],pev_origin,Nesne_Konumu)
			
			new Float:n_Uzaklik = floatpower(floatpower(float(Oyuncu_Nisani[0]) - Nesne_Konumu[0],2.0)+floatpower(float(Oyuncu_Nisani[1]) - Nesne_Konumu[1],2.0)+floatpower(float(Oyuncu_Nisani[2]) - Nesne_Konumu[2],2.0),0.5)
			if ( n_Uzaklik < Uzaklik || Uzaklik == 0 ){
			
				Uzaklik = n_Uzaklik
				En_Yakin_Katman = x
				
				
			}
			
	
		}
	
	}
	
				
	if ( En_Yakin_Katman != -1 )
		Lazer_Olustur(id,REKLAM_KIMLIKLERI[En_Yakin_Katman][2])

	
	return En_Yakin_Katman
}
public Lazer_Olustur(id,Nesne){

	new Float:Oyuncu_Konumu[3] , Float:Nesne_Konumu[3]
	pev(id,pev_origin,Oyuncu_Konumu)
	pev(Nesne,pev_origin,Nesne_Konumu)
	
	message_begin(MSG_ONE_UNRELIABLE ,SVC_TEMPENTITY,{0,0,0},id) //message begin
	write_byte(0)
	write_coord(floatround( Oyuncu_Konumu[0])) /// Start possion
	write_coord(floatround( Oyuncu_Konumu[1]))
	write_coord(floatround( Oyuncu_Konumu[2]))
	write_coord(floatround( Nesne_Konumu[0]) ) /// End possion
	write_coord(floatround( Nesne_Konumu[1]) )
	write_coord(floatround( Nesne_Konumu[2]) )
	write_short(laser) // sprite index
	write_byte(3) // starting frame
	write_byte(0) // frame rate in 0.1's
	write_byte(1) // life in 0.1's
	write_byte(5) // line width in 0.1's
	write_byte(0) // noise amplitude in 0.01's
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(125) // brightness)
	write_byte(0) // scroll speed in 0.1's
	message_end()

	return PLUGIN_HANDLED
}


public client_PreThink(id){

	if ( MenuAcikligi[id] != 0 ){
		
		if( pev_valid(ReklamEnt[id][0]) ) {
			
			ReklamYazisiniOlustur(id,id)
			EnKisaMesafeyiBul(id)
			

		}
	}
}



public ReklamMenu(id){
	
	if( access(id,AYAR_YETKISI) ){

		new ReklamAdeti = Reklam_Adeti_Ogren()

		new Yazi[86] = "\r*** \wLCS Reklam Menu \r***"
		
		formatex(Yazi,charsmax(Yazi),"%s ^n^n\rREKLAM SINIRI : \r%d/%d",Yazi,ReklamAdeti,REKLAM_SINIRI)
		
		new menu = menu_create(Yazi, "ReklamMenu_Devam")
		
		menu_additem(menu , "Sureyi Yenile", "1")
		
		if ( ReklamAdeti < REKLAM_SINIRI )
			menu_additem(menu , "Reklami Yerlestir", "2")
		else	menu_additem(menu , "\dReklami Yerlestir", "1")
		
		if ( ReklamAdeti <= 0 ){
			menu_additem(menu , "\dReklami Kaldir", "1")
			menu_additem(menu , "\dTum Reklamlari Kaldir^n", "1")
		}
		else
		{
			menu_additem(menu , "Reklami Kaldir", "3")
			menu_additem(menu , "Tum Reklamlari Kaldir^n", "7")
		}
		
		formatex(Yazi,charsmax(Yazi),"Stil : \r%d/11",STIL+1)
		menu_additem(menu , Yazi, "4")
		
		
		formatex(Yazi,charsmax(Yazi),"Renk : \r%d/15",Renk+1)
		menu_additem(menu , Yazi, "5")
		
		formatex(Yazi,charsmax(Yazi),"Buyukluk : \r%d/10",Buyukluk)
		menu_additem(menu , Yazi, "6")
		
	
		menu_setprop(menu,MPROP_EXITNAME,"Cikis")
		menu_setprop(menu,MPROP_EXIT, MEXIT_NORMAL)
		
		menu_display(id,menu)
		
		
		if ( MenuAcikligi[id] == 0 ){
			MenuAcikligi[id] = 5
			Menu_Acikligi_Algila(id)
			
			if ( !pev_valid(ReklamEnt[id][0]) || pev_valid(ReklamEnt[id][0]) == -1 )
				ReklamYazisiniOlustur(id,0)
		}
		else MenuAcikligi[id] = 5
		
		Cubuk_Olustur(id,MenuAcikligi[id])
		StilDegis(id,STIL)
		RenkDegis(id,Renk)
		
	}
	else client_print_color(id,print_team_default,"^4Reklam Menu^1yu Acmak Icin Yeterli Yetkiye Sahip Degilsiniz !")
	return PLUGIN_HANDLED
	
	
}
public ReklamMenu_Devam(id, Menu , item){
	new data[6], iName[64]
	new acces, callback
	menu_item_getinfo(Menu, item, acces, data,5, iName, 63, callback)
	
	switch(str_to_num(data)){
		
		
		case 2 : {
			
			ReklamiYerlestir(id,Renk,STIL,Buyukluk) , MenuAcikligi[id] = 0
		
		}
		
		case 3 : {
			
			Reklam_Kimligi_Kaldir(EnKisaMesafeyiBul(id))
		
		}
		
		case 4 : {
			
			if ( STIL >= 10 ) STIL = 0
			else STIL += 1
			
			StilDegis(id,STIL)
		
		}
		
		case 5 : {
			
			if ( Renk > 13 ) Renk = 0
			else Renk += 1
			
			RenkDegis(id,Renk)
			
		}
		
		case 6 : {
			
			if ( Buyukluk >= 10 ) Buyukluk = 1
			else Buyukluk += 1
			
		}
		
		case 7 : {
			
			for ( new i ; i < REKLAM_SINIRI ; i ++ )
				Reklam_Kimligi_Kaldir(i)
			
		}
		
	}
	
	
	if( !(str_to_num(data) == 0 || str_to_num(data) == 2) ) ReklamMenu(id)
	else ReklamEnt_Kaldir(id) , Cubuk_Olustur(id,0)
	
}
public BosKatmanBul(){
	
	new Bos_Katman = -1
	for ( new i ; i < REKLAM_SINIRI ; i++){

		if ( !pev_valid(REKLAM_KIMLIKLERI[0])){
				Bos_Katman = i
				break
		}
		
	}
	
	return Bos_Katman
	
	
}
public Reklam_Kimligi_Kaldir(KATMAN){

	if ( KATMAN >= 0 && KATMAN < REKLAM_SINIRI ){
		for ( new i ; i < 5 ; i++ ){
		
			if ( pev_valid(REKLAM_KIMLIKLERI[KATMAN])){
				
				remove_entity(REKLAM_KIMLIKLERI[KATMAN])
				REKLAM_KIMLIKLERI[KATMAN] = 0
				
				
			}
			
			
		}
		
		
		write_file(KayitDosyaYolu,"",KATMAN)
			
	}
}
public ReklamiYerlestir(id,xRenk,xStil,xBuyukluk){
	
	if ( MenuAcikligi[id] != 0 ){
		new Bos_Katman = BosKatmanBul()
		
		if ( Bos_Katman != -1 ){
		
			for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
			
				if ( pev_valid(ReklamEnt[id])){
					
					REKLAM_KIMLIKLERI[Bos_Katman] = ReklamEnt[id]
					ReklamEnt[id] = -1
					
				}
			}
			
			REKLAM_Goruntuleri[Bos_Katman][0] = xRenk
			REKLAM_Goruntuleri[Bos_Katman][1] = xStil
			REKLAM_Goruntuleri[Bos_Katman][2] = xBuyukluk
			
			new Float:Konum[3] , Float:Aci[3] , Yazi[64]
			KonumAciHesapla(id,Konum,Aci)
			formatex(Yazi,charsmax(Yazi),"%.1f %.1f %.1f %.1f %.1f %.1f %d %d %d",Konum[0],Konum[1],Konum[2],Aci[0],Aci[1],Aci[2],REKLAM_Goruntuleri[Bos_Katman][0],REKLAM_Goruntuleri[Bos_Katman][1],xBuyukluk)
			write_file(KayitDosyaYolu,Yazi,Bos_Katman)
		}
	}
}

public KayitliReklamlariYukle(){

	new satir_sayisi = file_size(KayitDosyaYolu, FSOPT_LINES_COUNT) - 1
	 
	if ( file_size(KayitDosyaYolu) == -1 ){
		
		new Harita_Ismi[32]
		get_mapname(Harita_Ismi,charsmax(Harita_Ismi))
		strtolower(Harita_Ismi)
		
		if ( equali(Harita_Ismi,"de_dust2" ) ){
			
			write_file(KayitDosyaYolu,"-2091.5 1825.1 17.2 32.4 198.4 0.0 0 9 3",0)
			write_file(KayitDosyaYolu,"384.0 2048.5 9.0 0.0 270.0 0.0 14 2 5",1)
			write_file(KayitDosyaYolu,"-501.0 -448.5 144.0 0.0 450.0 0.0 14 2 3",2)
			write_file(KayitDosyaYolu,"1280.5 1512.0 115.0 0.0 180.0 0.0 14 9 5",3)
			
			set_task(5.0,"KayitliReklamlariYukle")
			return PLUGIN_HANDLED
		}
		else satir_sayisi = 0
		
	 
		
	}

	if ( satir_sayisi < REKLAM_SINIRI ){
		for ( new i = satir_sayisi ; i < REKLAM_SINIRI ; i++ ){
			write_file(KayitDosyaYolu,"",-1)
		}
		satir_sayisi = file_size(KayitDosyaYolu, FSOPT_LINES_COUNT) - 1
	}
	else if ( satir_sayisi != REKLAM_SINIRI ){
		delete_file(KayitDosyaYolu)
		KayitliReklamlariYukle()
		return PLUGIN_HANDLED
	}
	
			
	
	
	for(new i;i < satir_sayisi;i++) {
			
		new Yazi[64]
			
		read_file(KayitDosyaYolu,i,Yazi,charsmax(Yazi))
		if ( !equali(Yazi,"") ){
	
			new Konum_x[9] , Konum_y[9] , Konum_z[9]
			new Aci_x[9] , Aci_y[9] , Aci_z[9]
			new xRenk[4] , xStil[4] , xBuyukluk[4]
			
			parse(Yazi,Konum_x,charsmax(Konum_x),Konum_y,charsmax(Konum_y),Konum_z,charsmax(Konum_z),Aci_x,charsmax(Aci_x),Aci_y,charsmax(Aci_y),Aci_z,charsmax(Aci_z),xRenk,charsmax(xRenk),xStil,charsmax(xStil),xBuyukluk,charsmax(xBuyukluk))
				
			REKLAM_Goruntuleri[0] = str_to_num(xRenk)
			REKLAM_Goruntuleri[1] = str_to_num(xStil)
			REKLAM_Goruntuleri[i][2] = str_to_num(xBuyukluk)
				
				
			new Float:Konum[3]
			Konum[0] = str_to_float(Konum_x)
			Konum[1] = str_to_float(Konum_y)
			Konum[2] = str_to_float(Konum_z)
		
			new Float:Aci[3]
			Aci[0] = str_to_float(Aci_x)
			Aci[1] = str_to_float(Aci_y)
			Aci[2] = str_to_float(Aci_z)
				
			Hedefe_Yazdir(Konum,Aci,-1,REKLAM_Goruntuleri[i][2])
				
			RenkDegis(0,REKLAM_Goruntuleri[i][0])
			StilDegis(0,REKLAM_Goruntuleri[i][1])
				
				
			for ( new j ; j < Basamak_Sayisi + 2 ; j++ ){
			
				if ( pev_valid(ReklamEnt[0][j])){
						
					REKLAM_KIMLIKLERI[i][j] = ReklamEnt[0][j]
					ReklamEnt[0][j] = -1
						
				}
			}
		}
	
		

	
		StilveRenk_Rastegle_Tekrari()
	
	}

	return PLUGIN_CONTINUE
}

public StilveRenk_Rastegle_Tekrari(){


	for ( new x ; x < REKLAM_SINIRI ; x++ ){
	
	
		if ( REKLAM_Goruntuleri[x][0] == 14 ){
		
		
		
		
			for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
				if ( pev_valid(REKLAM_KIMLIKLERI[x][i])){
					new Katman = random_num(0,13)
					if ( i == 1 ){
						for ( new j = 1 ; j <= Basamak_Sayisi ; j++ )
							set_pev(REKLAM_KIMLIKLERI[x][j],pev_rendercolor , Renkler[Katman])
						
						i += Basamak_Sayisi - 1
					}
					else set_pev(REKLAM_KIMLIKLERI[x][i],pev_rendercolor , Renkler[Katman])
				}
				else
				{
					REKLAM_Goruntuleri[x][0] = 0
					break
				}
			}
		
		
		
		
		
		}
	
	
	
		
	
		if ( REKLAM_Goruntuleri[x][1] == 10 ){
		
		
		
		
			for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
				if ( pev_valid(REKLAM_KIMLIKLERI[x][i])){
			
					new Katman = random_num(1,9)
					
					if ( i == 1 ){
						for ( new j = 1 ; j <= Basamak_Sayisi ; j++ )
							set_pev(REKLAM_KIMLIKLERI[x][j],pev_renderfx,Stiller[Katman])
						
						i += Basamak_Sayisi - 1
					}
					else set_pev(REKLAM_KIMLIKLERI[x][i],pev_renderfx,Stiller[Katman])
					
				}
				else
				{
					REKLAM_Goruntuleri[x][1] = 0
					break
				}
			}
		
		
		
		
		
		}
	
	
	
	}



	set_task(random_float(2.0,30.0),"StilveRenk_Rastegle_Tekrari")



}


public RenkDegis(id,_RENK){
	
	for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
	
		if ( pev_valid(ReklamEnt[id][i])){
			
			new Katman
			if ( _RENK == 14 )
				Katman = random_num(0,13)
			else	Katman = _RENK
			
			if ( i == 1 ){
				for ( new j = 1 ; j <= Basamak_Sayisi ; j++ )
					set_pev(ReklamEnt[id][j],pev_rendercolor , Renkler[Katman])
				
				i += Basamak_Sayisi - 1
			}
			else set_pev(ReklamEnt[id][i],pev_rendercolor , Renkler[Katman])
			
			
		}
		
	}

}

public StilDegis(id,_STIL){
	
	for ( new i ; i < Basamak_Sayisi + 2 ; i++ ){
	
		if ( pev_valid(ReklamEnt[id][i])){
			
			new Katman
			if ( Stiller[_STIL] == -1 )
				Katman = random_num(1,9)
			else	Katman = _STIL
			
			if ( i == 1 ){
				for ( new j = 1 ; j <= Basamak_Sayisi ; j++ )
					set_pev(ReklamEnt[id][j],pev_renderfx,Stiller[Katman])
				
				i += Basamak_Sayisi - 1
			}
			else set_pev(ReklamEnt[id][i],pev_renderfx,Stiller[Katman])
			
		}
			
			
	}
	

}
public Float:KonumAciHesapla(id,Float:vCenter_Origin[3],Float:Angles[3]){


	new Center_Origin[3];
	new Float:vNormal[3];
	get_user_origin(id, Center_Origin, 3);
	IVecFVec(Center_Origin, vCenter_Origin);
	new Float:vPlayerCenter_Origin[3];
	new Float:vViewOfs[3];
	entity_get_vector(id, EV_VEC_origin, vPlayerCenter_Origin);
	entity_get_vector(id, EV_VEC_view_ofs, vViewOfs);
	vPlayerCenter_Origin[0] += vViewOfs[0];
	vPlayerCenter_Origin[1] += vViewOfs[1];
	vPlayerCenter_Origin[2] += vViewOfs[2];
	new Float:Player_Aim[3];
	entity_get_vector(id, EV_VEC_v_angle, Angles);
	Player_Aim[0] = vPlayerCenter_Origin[0] + floatcos(Angles[1], degrees ) * 9999.9	
	Player_Aim[1] = vPlayerCenter_Origin[1] + floatsin(Angles[1], degrees) * 9999.9	
	Player_Aim[2] = vPlayerCenter_Origin[2] + floatsin(-Angles[0], degrees) * 9999.9	
	trace_normal(id, vPlayerCenter_Origin, Player_Aim, vNormal);
	vector_to_angle(vNormal, Angles)
	Angles[1] += 180.0
	
	
	vCenter_Origin[0] += (vNormal[0] * 0.5);
	vCenter_Origin[1] += (vNormal[1] * 0.5);
	vCenter_Origin[2] += (vNormal[2] * 0.5);


	return vCenter_Origin,Angles
	
}

public ReklamYazisiniOlustur(id,Oteleme){
	
	new Float:vCenter_Origin[3];
	new Float:Angles[3];
	
	KonumAciHesapla(id,vCenter_Origin,Angles)
	
	if ( Oteleme == 0 )
		Oteleme = id * sunucu_kapasitesi
	
	Hedefe_Yazdir(vCenter_Origin,Angles,Oteleme,Buyukluk)
	
	return PLUGIN_CONTINUE
	
}
public Hedefe_Yazdir(Float:Konum[3],Float:Aci[3],id,int_Buyukluk){
	
	for ( new i ; i < 3 ; i++ ){
	
		new Katman , Float: _Buyukluk = float(int_Buyukluk) / 16.6
		
		if ( i == 0 ) Katman = 10
		else 
		{	
			if ( i == 1 ){
				_Buyukluk = float(int_Buyukluk) / 12.5
			
				for ( new j ; j < Basamak_Sayisi ; j++ ){
				
					Katman = IP_Sonu[j]
					Konum[0] += floatcos(Aci[1]-90.0,degrees) * _Buyukluk * 45.0
					Konum[1] += floatsin(Aci[1]-90.0,degrees) * _Buyukluk * 45.0
					Nesneyi_Olustur(Konum,Aci,_Buyukluk,Katman,id)
					
				}
				
			}
			else
			{
				if ( IP_net == 0 )
					Katman = 11
				else	Katman = 12
				Konum[0] += floatcos(Aci[1]-90.0,degrees) * _Buyukluk * 230.0
				Konum[1] += floatsin(Aci[1]-90.0,degrees) * _Buyukluk * 230.0
				
			}
			
		}
		

		
	
		if ( i != 1 ) Nesneyi_Olustur(Konum,Aci,_Buyukluk,Katman,id)
	
		
		
	}

	
}

new Olusum_Katmani
public Nesneyi_Olustur(Float:Konum[3],Float:Aci[3],Float:Buyukluk,Katman,id){

	new Nesne
	
	if ( id >= sunucu_kapasitesi || id == -1){
		if ( id == -1 ) id = 0
		else id /= sunucu_kapasitesi
		Nesne = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "env_sprite" ) )
		ReklamEnt[id][Olusum_Katmani] = Nesne
		
		if(pev_valid(Nesne)){
			
			set_pev( Nesne, pev_origin, Konum )
			set_pev( Nesne, pev_angles, Aci )
			set_pev( Nesne, pev_scale , Buyukluk )
			set_pev( Nesne, pev_frame , float(Katman) )
			set_pev( Nesne, pev_rendermode, kRenderTransAdd )
			set_pev( Nesne, pev_renderamt, 255.0)
				
			engfunc( EngFunc_SetModel, Nesne, MODEL )
			set_pev( Nesne,pev_classname,REKLAM_SINIF_ISIMLERI )
			
		}
	}
	else	Nesne = ReklamEnt[id][Olusum_Katmani]
	
	if(pev_valid(Nesne)){
			
		set_pev( Nesne, pev_origin, Konum )
		set_pev( Nesne, pev_angles, Aci )
		set_pev( Nesne, pev_scale , Buyukluk )
			
	}
	
	Olusum_Katmani += 1
	if ( Olusum_Katmani >= Basamak_Sayisi + 2 ) Olusum_Katmani = 0
}


public Ip_Sonu_Bul(){

	get_user_ip(0 , IP , charsmax(IP) )
	Basamak_Sayisi = 0
	
	if ( contain(IP, SABIT_SAYILAR) == 0 )
		for ( new i = 12 ; i < contain(IP, PORT) - 1 ; i++ ){
			new Sayi[2]
			formatex(Sayi,charsmax(Sayi),"%c",IP[i])
			IP_Sonu[i-12] = str_to_num(Sayi)
			Basamak_Sayisi++
		}
	
	IP_net = ( IP_Sonu[0] * 100 ) + ( IP_Sonu[1] * 10 ) + IP_Sonu[2]
	if (  IP_net > 200 && IP_net < 217 ){
		
		IP_net -= 200
		
		if ( IP_net < 10 ){
			IP_Sonu[0] = IP_Sonu[2]
			Basamak_Sayisi = 1
			
		}
		else
		{
			IP_Sonu[0] = IP_Sonu[1]
			IP_Sonu[1] = IP_Sonu[2]
			Basamak_Sayisi = 2
		}
		
		
		IP_net = 1
	}
	else	IP_net = 0
	
	
}


public plugin_precache(){
	precache_model(MODEL)
	laser = precache_model("sprites/laserbeam.spr")
}


public Menu_Acikligi_Algila(id){
	
	if ( MenuAcikligi[id] != 0 ){
		
		MenuAcikligi[id] -= 1
		set_task(1.0,"Menu_Acikligi_Algila",id)
		
		
	}
	else ReklamEnt_Kaldir(id)
	
}
public ReklamEnt_Kaldir(id){

	for ( new i ; i < 5 ; i++ ){

		if ( pev_valid(ReklamEnt[id][i]))
			remove_entity(ReklamEnt[id][i])
			
		ReklamEnt[id][i] = 0
			
	}

}
public Reklam_Adeti_Ogren(){

	new Adet
	for ( new i ; i < REKLAM_SINIRI ; i++ ){
	
	
		if ( pev_valid(REKLAM_KIMLIKLERI[i][0]))
			Adet++
	
	
	}



	return Adet

}
stock Cubuk_Olustur(id, Cubugun_Dolma_Suresi) {
	message_begin(MSG_ONE, Mesaj_Stili, _, id)
	write_short(Cubugun_Dolma_Suresi)
	message_end()
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/

R0tty
Membru, skill 0
Membru, skill 0
Posts: 76
Joined: 16 Aug 2009, 21:28
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Been thanked: 1 time

31 Mar 2020, 11:14

Mda , nimeni si nimic .
Cred ca am pus postarea unde nu trebuie de aia nu ma baga nimeni in seama.
Va multumesc de ajutor !
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests