Discord sunucumuz açılmıştır, hepinizi bekleriz

https://discord.gg/43gGDQe6tS

Basit istek

Moderatör: Moderatörler

Forum kuralları
[font size=20] DİKKAT [/font]

Silinmiş konu içerikleri hiçbir şekilde kontrol edlimemektedir. İndirdiğiniz dosyaların sorumluluğu tamamiyle size aittir.
Mutlaka indirdiğiniz dosyaları antivirüs ile taratınız.

Konu Sahibi
ERRA
Mesajlar: 66
Kayıt: Prş Haz 25, 2020 11:06 pm

Basit istek

Mesaj gönderen ERRA »

orucoglukayra yazdı: Pzr Eki 17, 2021 9:20 pm Estağfurullah, buyur ;

Kod: Tümünü seç

#pragma semicolon 1

native crxranks_get_user_level(index);

#include <amxmodx>
#include <reapi>

new const g_szModel[][] =
{
	"models/awesome.mdl",     // Terrorist Hat.
	"models/barrel.mdl"      // Counter-Terrorst Hat.
};

new g_iEnt[MAX_PLAYERS+1],g_iModelIndex[sizeof(g_szModel)],hiz,bool:g_HasSpeed[MAX_CLIENTS+1];

public plugin_init()
{
	register_plugin("Hat for Authorization", "0.1", "` BesTCore;");
	
	RegisterHookChain(RG_CBasePlayer_Spawn, "RG_CBasePlayer_Spawn_Post", .post = true);
	RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed,"RG_CBasePlayer_ResetMaxSpeed_Post",.post = false);
	RegisterHookChain(RG_CBasePlayer_TakeDamage, "RG_CBasePlayer_TakeDamage_Post", .post = false);

	bind_pcvar_num(create_cvar("rank_hiz", "500"), hiz);
}
public RG_CBasePlayer_Spawn_Post(id)
{
	if(get_member(id, m_bJustConnected))
	{
		return;
	}
	
	if(crxranks_get_user_level(id) >= 5)
	{
		CreateModel(id);
		set_entvar(id, var_maxspeed, float(hiz));
		g_HasSpeed[id] = true;
	}
}
public RG_CBasePlayer_ResetMaxSpeed_Post(const id) 
{
	if(g_HasSpeed[id]) 
	{
		set_entvar(id, var_maxspeed, float(hiz));
		return HC_SUPERCEDE;
	}
	return HC_CONTINUE;
}
public RG_CBasePlayer_TakeDamage_Post(const this, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType)
{
	if(!is_user_connected(pevAttacker) || !rg_is_player_can_takedamage(this, pevAttacker) || this == pevAttacker) 
	{
		return;
	}

	if(crxranks_get_user_level(pevAttacker) >= 5)
	{
		SetHookChainArg(4, ATYPE_FLOAT, flDamage*1.5);
	}
}
public CreateHat(const id)
{
	g_iEnt[id] = rg_create_entity("info_target");

	CreateModel(id);
}
public CreateModel(id)
{
	new TeamName:iTeam = get_member(id, m_iTeam);

	switch(iTeam)
	{
		case TEAM_TERRORIST:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[0]);
		}
		case TEAM_CT:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[1]);
		}
	}
	set_entvar(g_iEnt[id], var_movetype, MOVETYPE_FOLLOW);
	set_entvar(g_iEnt[id], var_aiment, id);
}
RemoveTheHat(const id)
{
	if(!is_nullent(g_iEnt[id]))
	{
		set_entvar(g_iEnt[id], var_flags, FL_KILLME);
		g_iEnt[id] = 0;
	}
}
public client_putinserver(id)
{
	if(crxranks_get_user_level(id) >= 5)
	{
		CreateHat(id);
	}
}
public client_disconnected(id)
{
	RemoveTheHat(id);
	g_HasSpeed[id] = false;
}
public plugin_precache()
{
	for(new i = 0; i < sizeof(g_szModel); i++)
	{
		g_iModelIndex[i] = precache_model(fmt("%s", g_szModel[i]));
	}
}
:hl: Damage 1.5 kat artıcak şeklinde ayarladım.Kendinize göre editleyebilirsiniz.Değer ondalıklı olsun.

Kod: Tümünü seç

SetHookChainArg(4, ATYPE_FLOAT, flDamage*1.5);
Allah razı olsun hocam bir değil bin kere teşekür ederim eline koluna emeğine sağlık çok sağol

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
ERRA
Mesajlar: 66
Kayıt: Prş Haz 25, 2020 11:06 pm

Basit istek

Mesaj gönderen ERRA »

orucoglukayra yazdı: Pzr Eki 17, 2021 9:20 pm Estağfurullah, buyur ;

Kod: Tümünü seç

#pragma semicolon 1

native crxranks_get_user_level(index);

#include <amxmodx>
#include <reapi>

new const g_szModel[][] =
{
	"models/awesome.mdl",     // Terrorist Hat.
	"models/barrel.mdl"      // Counter-Terrorst Hat.
};

new g_iEnt[MAX_PLAYERS+1],g_iModelIndex[sizeof(g_szModel)],hiz,bool:g_HasSpeed[MAX_CLIENTS+1];

public plugin_init()
{
	register_plugin("Hat for Authorization", "0.1", "` BesTCore;");
	
	RegisterHookChain(RG_CBasePlayer_Spawn, "RG_CBasePlayer_Spawn_Post", .post = true);
	RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed,"RG_CBasePlayer_ResetMaxSpeed_Post",.post = false);
	RegisterHookChain(RG_CBasePlayer_TakeDamage, "RG_CBasePlayer_TakeDamage_Post", .post = false);

	bind_pcvar_num(create_cvar("rank_hiz", "500"), hiz);
}
public RG_CBasePlayer_Spawn_Post(id)
{
	if(get_member(id, m_bJustConnected))
	{
		return;
	}
	
	if(crxranks_get_user_level(id) >= 5)
	{
		CreateModel(id);
		set_entvar(id, var_maxspeed, float(hiz));
		g_HasSpeed[id] = true;
	}
}
public RG_CBasePlayer_ResetMaxSpeed_Post(const id) 
{
	if(g_HasSpeed[id]) 
	{
		set_entvar(id, var_maxspeed, float(hiz));
		return HC_SUPERCEDE;
	}
	return HC_CONTINUE;
}
public RG_CBasePlayer_TakeDamage_Post(const this, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType)
{
	if(!is_user_connected(pevAttacker) || !rg_is_player_can_takedamage(this, pevAttacker) || this == pevAttacker) 
	{
		return;
	}

	if(crxranks_get_user_level(pevAttacker) >= 5)
	{
		SetHookChainArg(4, ATYPE_FLOAT, flDamage*1.5);
	}
}
public CreateHat(const id)
{
	g_iEnt[id] = rg_create_entity("info_target");

	CreateModel(id);
}
public CreateModel(id)
{
	new TeamName:iTeam = get_member(id, m_iTeam);

	switch(iTeam)
	{
		case TEAM_TERRORIST:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[0]);
		}
		case TEAM_CT:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[1]);
		}
	}
	set_entvar(g_iEnt[id], var_movetype, MOVETYPE_FOLLOW);
	set_entvar(g_iEnt[id], var_aiment, id);
}
RemoveTheHat(const id)
{
	if(!is_nullent(g_iEnt[id]))
	{
		set_entvar(g_iEnt[id], var_flags, FL_KILLME);
		g_iEnt[id] = 0;
	}
}
public client_putinserver(id)
{
	if(crxranks_get_user_level(id) >= 5)
	{
		CreateHat(id);
	}
}
public client_disconnected(id)
{
	RemoveTheHat(id);
	g_HasSpeed[id] = false;
}
public plugin_precache()
{
	for(new i = 0; i < sizeof(g_szModel); i++)
	{
		g_iModelIndex[i] = precache_model(fmt("%s", g_szModel[i]));
	}
}
:hl: Damage 1.5 kat artıcak şeklinde ayarladım.Kendinize göre editleyebilirsiniz.Değer ondalıklı olsun.

Kod: Tümünü seç

SetHookChainArg(4, ATYPE_FLOAT, flDamage*1.5);
ne desem ne kadar teşekür etsem azdır gerçekten öyle yani sürekli yeni isteklerle karşına çııyorum parça parça itiyorum kusura bakma ama en son şu şekilde kullanıyorum eklentiyi hızı kendimde kaldırmaya çalıştım :D tekrar senı yormamak için şimdi eksik olan tek şey bir renkli mermi acaba belli bir lvlin üstünde mermilerin izli renkli yada önerdiğiniz bir şekilde gösterişli gitme şansı varmıdırç
Bu mesaja eklenen dosyaları görüntülemek için gerekli izinlere sahip değilsiniz.

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

orucoglukayra
Mesajlar: 209
Kayıt: Pzr Haz 09, 2019 2:48 pm
İletişim:

Basit istek

Mesaj gönderen orucoglukayra »

Hız'ın kaldırılmış hali ;

Kod: Tümünü seç

#pragma semicolon 1

native crxranks_get_user_level(index);

#include <amxmodx>
#include <reapi>

new const g_szModel[][] =
{
	"models/xec/kirmizikanat.mdl",             // Terrorist Hat.
	"models/xec/Kanat.mdl"                    // Counter-Terrorst Hat.
};

new g_iEnt[MAX_PLAYERS+1],g_iModelIndex[sizeof(g_szModel)];

public plugin_init()
{
	register_plugin("Hat for Authorization", "0.1", "` BesTCore;");
	
	RegisterHookChain(RG_CBasePlayer_Spawn, "RG_CBasePlayer_Spawn_Post", .post = true);
	RegisterHookChain(RG_CBasePlayer_TakeDamage, "RG_CBasePlayer_TakeDamage_Post", .post = false);

}
public RG_CBasePlayer_Spawn_Post(id)
{
	if(get_member(id, m_bJustConnected))
	{
		return;
	}
	
	if(crxranks_get_user_level(id) == 33)
	{
		CreateModel(id);
	}
}
public RG_CBasePlayer_TakeDamage_Post(const this, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType)
{
	if(!is_user_connected(pevAttacker) || !rg_is_player_can_takedamage(this, pevAttacker) || this == pevAttacker) 
	{
		return;
	}

	if(crxranks_get_user_level(pevAttacker) == 33)
	{
		SetHookChainArg(4, ATYPE_FLOAT, flDamage*1.3);
	}
}
public CreateHat(const id)
{
	g_iEnt[id] = rg_create_entity("info_target");

	CreateModel(id);
}
public CreateModel(id)
{
	new TeamName:iTeam = get_member(id, m_iTeam);

	switch(iTeam)
	{
		case TEAM_TERRORIST:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[0]);
		}
		case TEAM_CT:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[1]);
		}
	}
	set_entvar(g_iEnt[id], var_movetype, MOVETYPE_FOLLOW);
	set_entvar(g_iEnt[id], var_aiment, id);
}
RemoveTheHat(const id)
{
	if(!is_nullent(g_iEnt[id]))
	{
		set_entvar(g_iEnt[id], var_flags, FL_KILLME);
		g_iEnt[id] = 0;
	}
}
public client_putinserver(id)
{
	if(crxranks_get_user_level(id) == 33)
	{
		CreateHat(id);
	}
}
public client_disconnected(id)
{
	RemoveTheHat(id);
}
public plugin_precache()
{
	for(new i = 0; i < sizeof(g_szModel); i++)
	{
		g_iModelIndex[i] = precache_model(fmt("%s", g_szModel[i]));
	}
}
Renkli mermi için bu eklentiyi kullanın, sadece 30 leveller kullanabilecek.

Kod: Tümünü seç

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

native crxranks_get_user_level(index);

#define VERSION "1.3.0"

#define MAX_PLAYERS	32
#define IsPlayer(%1)	( 1 <= %1 <= g_iMaxPlayers )
#define write_coord_f(%1)	engfunc(EngFunc_WriteCoord,%1) 

#define m_pActiveItem	373

const GUNS_BITSUM  = ((1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE))
const SHOTGUNS_BITSUM = ((1<<CSW_XM1014)|(1<<CSW_M3))
const SMGS_BITSUM  = ((1<<CSW_MAC10)|(1<<CSW_UMP45)|(1<<CSW_MP5NAVY)|(1<<CSW_TMP)|(1<<CSW_P90))
const RIFFLES_BITSUM  = ((1<<CSW_AUG)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_M249)|(1<<CSW_M4A1)|(1<<CSW_SG552)|(1<<CSW_AK47))
const SNIPERS_BITSUM  = ((1<<CSW_SCOUT)|(1<<CSW_SG550)|(1<<CSW_AWP)|(1<<CSW_G3SG1))

const SILEN_BITSUM	= ((1<<CSW_USP)|(1<<CSW_M4A1))

enum _:PcvarsNum {
	HandGuns = 0,
	ShotGuns,
	SmgGuns,
	RiffleGuns,
	SnipeGuns
}

new const g_iWeaponBitSumList[] = { GUNS_BITSUM , SHOTGUNS_BITSUM , SMGS_BITSUM , RIFFLES_BITSUM , SNIPERS_BITSUM }

new g_iMaxPlayers
new Trie:g_tClassNames

new g_pCvar[PcvarsNum], g_pCvarTraceEnabled, g_pCvarTraceHideSilen

#if defined PER_PLAYER_SETTINGS
new g_bHltv[MAX_PLAYERS+1], g_bSeeTracers[MAX_PLAYERS+1]
new g_pCvarTraceHltv
#endif

new isin;

new g_Ates[ 33 ];

public plugin_precache()
{
	g_tClassNames = TrieCreate()
	
	RegisterHam(Ham_TraceAttack, "worldspawn", "TraceAttack", 1)
	TrieSetCell(g_tClassNames, "worldspawn", 1)
	RegisterHam(Ham_TraceAttack, "player", "TraceAttack", 1)
	TrieSetCell(g_tClassNames, "player", 1)
	
	register_forward(FM_Spawn, "Spawn", 1)
	isin = precache_model( "sprites/dot.spr" );
}

public Spawn( iEnt )
{
	if( pev_valid(iEnt) )
	{
		static szClassName[32]
		pev(iEnt, pev_classname, szClassName, charsmax(szClassName))
		if( !TrieKeyExists(g_tClassNames, szClassName) )
		{
			RegisterHam(Ham_TraceAttack, szClassName, "TraceAttack", 1)
			TrieSetCell(g_tClassNames, szClassName, 1)
		}
	}
}

public plugin_end()
{
	TrieDestroy(g_tClassNames)
}

public plugin_init()
{
	register_plugin("Advanced Weapon Tracers", VERSION, "ConnorMcLeod")
	register_cvar("awt_version", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
	
	g_pCvarTraceEnabled = register_cvar("amx_tracers", "1")
	
	g_pCvar[HandGuns] = register_cvar("amx_trace_handguns", "1")
	g_pCvar[ShotGuns] = register_cvar("amx_trace_shotguns", "1")
	g_pCvar[SmgGuns] = register_cvar("amx_trace_smgguns", "1")
	g_pCvar[RiffleGuns] = register_cvar("amx_trace_riffleguns", "1")
	g_pCvar[SnipeGuns] = register_cvar("amx_trace_snipeguns", "1")
	
	g_pCvarTraceHideSilen = register_cvar("amx_trace_hide_silen", "1")
	#if defined PER_PLAYER_SETTINGS
	g_pCvarTraceHltv = register_cvar("amx_trace_hltv", "1")
	register_clcmd("say /tracers", "ClientCommand_Tracers")
	#endif
	
	g_iMaxPlayers = get_maxplayers()
}

#if defined PER_PLAYER_SETTINGS
public client_putinserver(id)
{
	g_bSeeTracers[id] = !is_user_bot(id)
	g_bHltv[id] = is_user_hltv(id)
	set_task(35.0, "TaskAnnouncement", id)
}

public ClientCommand_Tracers(id)
{
	client_print(id, print_chat, "** [Advanced Weapon Tracers] Tracers are now %s", 
	(g_bSeeTracers[id] = !g_bSeeTracers[id]) ? "ON" : "OFF")
	return PLUGIN_HANDLED
}


public TaskAnnouncement(id)
{
	client_print(id, print_chat, "** [Advanced Weapon Tracers] You can [en/dis]able tracers by typing /tracers in chat")
}
#endif

public TraceAttack(iEnt, iAttacker, Float:flDamage, Float:fDir[3], ptr, iDamageType)
{
	if( !IsPlayer(iAttacker) || get_pcvar_num(g_pCvarTraceEnabled) == 0 )
	{
		return
	}

	if(crxranks_get_user_level(iAttacker) != 30)
	{
		return
	}
	
	new iWeapon = get_user_weapon(iAttacker)
	if( iWeapon == CSW_KNIFE )
	{
		return
	}
	
	new bWeapon = (1<<iWeapon)
	for(new a; a<sizeof(g_iWeaponBitSumList); a++)
	{
		if( bWeapon & g_iWeaponBitSumList[a] )
		{
			if( get_pcvar_num(g_pCvar[a]) )
			{
				break
			}
			else
			{
				return
			}
		}
	}
	
	if( SILEN_BITSUM & bWeapon )
	{
		if( get_pcvar_num(g_pCvarTraceHideSilen) )
		{
			if( cs_get_weapon_silen(get_pdata_cbase(iAttacker, m_pActiveItem)) )
			{
				return
			}
		}
	}
	#if defined TMP_IS_A_SILENCED_WEAPON
	else if( iWeapon == CSW_TMP && get_pcvar_num(g_pCvarTraceHideSilen) )
	{
		return
	}
	#endif
	
	g_Ates[ iAttacker ] += 1;
	if( g_Ates[ iAttacker ] >= 8 )
	{
		g_Ates[ iAttacker ] = 1;
	}
	
	new iOrigin[3], Float:flEnd[3]
	
	get_user_origin(iAttacker, iOrigin, 1)
	get_tr2(ptr, TR_vecEndPos, flEnd)
	
	#if defined PER_PLAYER_SETTINGS
	new iPlayers[MAX_PLAYERS], iNum, iPlayer, bHltv
	new x = iOrigin[0], y = iOrigin[1], z = iOrigin[2]
	new Float:fX = flEnd[0], Float:fY = flEnd[1], Float:fZ = flEnd[2]
	get_players(iPlayers, iNum)
	for(new i; i<iNum; i++)
	{
		iPlayer = iPlayers[i]
		if( g_bHltv[iPlayer] )
		{
			if( !bHltv && get_pcvar_num(g_pCvarTraceHltv) == 1 )
			{
				bHltv = true
				message_begin(MSG_SPEC, SVC_TEMPENTITY)
				write_byte ( 0 );
				write_coord(x)
				write_coord(y)
				write_coord(z)
				write_coord_f(fX) 
				write_coord_f(fY) 
				write_coord_f(fZ) 
				write_short( isin );
				write_byte( 1 );
				write_byte( 5);
				write_byte( 1);
				write_byte( 5 );
				write_byte( 0 );
				write_byte( r ); 
				write_byte( g );  
				write_byte( b );   
				write_byte( 200 ); 
				write_byte( 150 ); 
				message_end()
			}
		}
		else if( g_bSeeTracers[iPlayer] )
		{
			
			message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, iPlayer)
			write_byte ( 0 );
			write_coord(x)
			write_coord(y)
			write_coord(z)
			write_coord_f(fX) 
			write_coord_f(fY) 
			write_coord_f(fZ) 
			write_short( isin );
			write_byte( 1 );
			write_byte( 5);
			write_byte( 1);
			write_byte( 5 );
			write_byte( 0 );
			write_byte( r ); 
			write_byte( g );  
			write_byte( b );   
			write_byte( 200 ); 
			write_byte( 150 ); 
			message_end()
			
		}
	}
	#else
	
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
	write_byte ( 0 );
	write_coord( iOrigin[ 0 ] );
	write_coord( iOrigin[ 1 ] );
	write_coord( iOrigin[ 2 ] );
	write_coord_f( flEnd[ 0 ] );
	write_coord_f( flEnd[ 1 ] );
	write_coord_f( flEnd[ 2 ] ); 
	write_short( isin );
	write_byte( 1 );
	write_byte( 3 );
	write_byte( 1);
	write_byte( 5 );
	write_byte( 0 );
	switch( g_Ates[ iAttacker ] )
	{
		case 1: {
			Renk( 255, 0, 0 );
		}
		case 2: {
			Renk( 0, 0, 255 );
		}
		case 3: {
			Renk( 0, 255, 0 );
		}
		case 4: {
			Renk( 255, 255, 0 );
		}
		case 5: {
			Renk( 255, 255, 255 );
		}
		case 6: {
			Renk( 255, 0, 255 );
		}
		case 7: {
			Renk( 255, 170, 255 );
		}
	}
	write_byte( 200 ); 
	write_byte( 150 ); 
	message_end()
	
	#endif
}

stock Renk( Kirmizi, Yesil, Mavi )
{
	write_byte( Kirmizi ); 
	write_byte( Yesil );  
	write_byte( Mavi );  
}
Burda leveli değiştirmek isterseniz, aşağıdaki yer ile oynama yapın.
Not : 30 level değilse kullanamaz. Bunu 30 üstü yapmak istersen "crxranks_get_user_level(iAttacker) < 30" şeklinde yapmalısın.

Kod: Tümünü seç

if(crxranks_get_user_level(iAttacker) != 30)
{
     return
}

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
ERRA
Mesajlar: 66
Kayıt: Prş Haz 25, 2020 11:06 pm

Basit istek

Mesaj gönderen ERRA »

orucoglukayra yazdı: Pzt Eki 18, 2021 3:43 pm Hız'ın kaldırılmış hali ;

Kod: Tümünü seç

#pragma semicolon 1

native crxranks_get_user_level(index);

#include <amxmodx>
#include <reapi>

new const g_szModel[][] =
{
	"models/xec/kirmizikanat.mdl",             // Terrorist Hat.
	"models/xec/Kanat.mdl"                    // Counter-Terrorst Hat.
};

new g_iEnt[MAX_PLAYERS+1],g_iModelIndex[sizeof(g_szModel)];

public plugin_init()
{
	register_plugin("Hat for Authorization", "0.1", "` BesTCore;");
	
	RegisterHookChain(RG_CBasePlayer_Spawn, "RG_CBasePlayer_Spawn_Post", .post = true);
	RegisterHookChain(RG_CBasePlayer_TakeDamage, "RG_CBasePlayer_TakeDamage_Post", .post = false);

}
public RG_CBasePlayer_Spawn_Post(id)
{
	if(get_member(id, m_bJustConnected))
	{
		return;
	}
	
	if(crxranks_get_user_level(id) == 33)
	{
		CreateModel(id);
	}
}
public RG_CBasePlayer_TakeDamage_Post(const this, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType)
{
	if(!is_user_connected(pevAttacker) || !rg_is_player_can_takedamage(this, pevAttacker) || this == pevAttacker) 
	{
		return;
	}

	if(crxranks_get_user_level(pevAttacker) == 33)
	{
		SetHookChainArg(4, ATYPE_FLOAT, flDamage*1.3);
	}
}
public CreateHat(const id)
{
	g_iEnt[id] = rg_create_entity("info_target");

	CreateModel(id);
}
public CreateModel(id)
{
	new TeamName:iTeam = get_member(id, m_iTeam);

	switch(iTeam)
	{
		case TEAM_TERRORIST:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[0]);
		}
		case TEAM_CT:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[1]);
		}
	}
	set_entvar(g_iEnt[id], var_movetype, MOVETYPE_FOLLOW);
	set_entvar(g_iEnt[id], var_aiment, id);
}
RemoveTheHat(const id)
{
	if(!is_nullent(g_iEnt[id]))
	{
		set_entvar(g_iEnt[id], var_flags, FL_KILLME);
		g_iEnt[id] = 0;
	}
}
public client_putinserver(id)
{
	if(crxranks_get_user_level(id) == 33)
	{
		CreateHat(id);
	}
}
public client_disconnected(id)
{
	RemoveTheHat(id);
}
public plugin_precache()
{
	for(new i = 0; i < sizeof(g_szModel); i++)
	{
		g_iModelIndex[i] = precache_model(fmt("%s", g_szModel[i]));
	}
}
Renkli mermi için bu eklentiyi kullanın, sadece 30 leveller kullanabilecek.

Kod: Tümünü seç

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

native crxranks_get_user_level(index);

#define VERSION "1.3.0"

#define MAX_PLAYERS	32
#define IsPlayer(%1)	( 1 <= %1 <= g_iMaxPlayers )
#define write_coord_f(%1)	engfunc(EngFunc_WriteCoord,%1) 

#define m_pActiveItem	373

const GUNS_BITSUM  = ((1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE))
const SHOTGUNS_BITSUM = ((1<<CSW_XM1014)|(1<<CSW_M3))
const SMGS_BITSUM  = ((1<<CSW_MAC10)|(1<<CSW_UMP45)|(1<<CSW_MP5NAVY)|(1<<CSW_TMP)|(1<<CSW_P90))
const RIFFLES_BITSUM  = ((1<<CSW_AUG)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_M249)|(1<<CSW_M4A1)|(1<<CSW_SG552)|(1<<CSW_AK47))
const SNIPERS_BITSUM  = ((1<<CSW_SCOUT)|(1<<CSW_SG550)|(1<<CSW_AWP)|(1<<CSW_G3SG1))

const SILEN_BITSUM	= ((1<<CSW_USP)|(1<<CSW_M4A1))

enum _:PcvarsNum {
	HandGuns = 0,
	ShotGuns,
	SmgGuns,
	RiffleGuns,
	SnipeGuns
}

new const g_iWeaponBitSumList[] = { GUNS_BITSUM , SHOTGUNS_BITSUM , SMGS_BITSUM , RIFFLES_BITSUM , SNIPERS_BITSUM }

new g_iMaxPlayers
new Trie:g_tClassNames

new g_pCvar[PcvarsNum], g_pCvarTraceEnabled, g_pCvarTraceHideSilen

#if defined PER_PLAYER_SETTINGS
new g_bHltv[MAX_PLAYERS+1], g_bSeeTracers[MAX_PLAYERS+1]
new g_pCvarTraceHltv
#endif

new isin;

new g_Ates[ 33 ];

public plugin_precache()
{
	g_tClassNames = TrieCreate()
	
	RegisterHam(Ham_TraceAttack, "worldspawn", "TraceAttack", 1)
	TrieSetCell(g_tClassNames, "worldspawn", 1)
	RegisterHam(Ham_TraceAttack, "player", "TraceAttack", 1)
	TrieSetCell(g_tClassNames, "player", 1)
	
	register_forward(FM_Spawn, "Spawn", 1)
	isin = precache_model( "sprites/dot.spr" );
}

public Spawn( iEnt )
{
	if( pev_valid(iEnt) )
	{
		static szClassName[32]
		pev(iEnt, pev_classname, szClassName, charsmax(szClassName))
		if( !TrieKeyExists(g_tClassNames, szClassName) )
		{
			RegisterHam(Ham_TraceAttack, szClassName, "TraceAttack", 1)
			TrieSetCell(g_tClassNames, szClassName, 1)
		}
	}
}

public plugin_end()
{
	TrieDestroy(g_tClassNames)
}

public plugin_init()
{
	register_plugin("Advanced Weapon Tracers", VERSION, "ConnorMcLeod")
	register_cvar("awt_version", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
	
	g_pCvarTraceEnabled = register_cvar("amx_tracers", "1")
	
	g_pCvar[HandGuns] = register_cvar("amx_trace_handguns", "1")
	g_pCvar[ShotGuns] = register_cvar("amx_trace_shotguns", "1")
	g_pCvar[SmgGuns] = register_cvar("amx_trace_smgguns", "1")
	g_pCvar[RiffleGuns] = register_cvar("amx_trace_riffleguns", "1")
	g_pCvar[SnipeGuns] = register_cvar("amx_trace_snipeguns", "1")
	
	g_pCvarTraceHideSilen = register_cvar("amx_trace_hide_silen", "1")
	#if defined PER_PLAYER_SETTINGS
	g_pCvarTraceHltv = register_cvar("amx_trace_hltv", "1")
	register_clcmd("say /tracers", "ClientCommand_Tracers")
	#endif
	
	g_iMaxPlayers = get_maxplayers()
}

#if defined PER_PLAYER_SETTINGS
public client_putinserver(id)
{
	g_bSeeTracers[id] = !is_user_bot(id)
	g_bHltv[id] = is_user_hltv(id)
	set_task(35.0, "TaskAnnouncement", id)
}

public ClientCommand_Tracers(id)
{
	client_print(id, print_chat, "** [Advanced Weapon Tracers] Tracers are now %s", 
	(g_bSeeTracers[id] = !g_bSeeTracers[id]) ? "ON" : "OFF")
	return PLUGIN_HANDLED
}


public TaskAnnouncement(id)
{
	client_print(id, print_chat, "** [Advanced Weapon Tracers] You can [en/dis]able tracers by typing /tracers in chat")
}
#endif

public TraceAttack(iEnt, iAttacker, Float:flDamage, Float:fDir[3], ptr, iDamageType)
{
	if( !IsPlayer(iAttacker) || get_pcvar_num(g_pCvarTraceEnabled) == 0 )
	{
		return
	}

	if(crxranks_get_user_level(iAttacker) != 30)
	{
		return
	}
	
	new iWeapon = get_user_weapon(iAttacker)
	if( iWeapon == CSW_KNIFE )
	{
		return
	}
	
	new bWeapon = (1<<iWeapon)
	for(new a; a<sizeof(g_iWeaponBitSumList); a++)
	{
		if( bWeapon & g_iWeaponBitSumList[a] )
		{
			if( get_pcvar_num(g_pCvar[a]) )
			{
				break
			}
			else
			{
				return
			}
		}
	}
	
	if( SILEN_BITSUM & bWeapon )
	{
		if( get_pcvar_num(g_pCvarTraceHideSilen) )
		{
			if( cs_get_weapon_silen(get_pdata_cbase(iAttacker, m_pActiveItem)) )
			{
				return
			}
		}
	}
	#if defined TMP_IS_A_SILENCED_WEAPON
	else if( iWeapon == CSW_TMP && get_pcvar_num(g_pCvarTraceHideSilen) )
	{
		return
	}
	#endif
	
	g_Ates[ iAttacker ] += 1;
	if( g_Ates[ iAttacker ] >= 8 )
	{
		g_Ates[ iAttacker ] = 1;
	}
	
	new iOrigin[3], Float:flEnd[3]
	
	get_user_origin(iAttacker, iOrigin, 1)
	get_tr2(ptr, TR_vecEndPos, flEnd)
	
	#if defined PER_PLAYER_SETTINGS
	new iPlayers[MAX_PLAYERS], iNum, iPlayer, bHltv
	new x = iOrigin[0], y = iOrigin[1], z = iOrigin[2]
	new Float:fX = flEnd[0], Float:fY = flEnd[1], Float:fZ = flEnd[2]
	get_players(iPlayers, iNum)
	for(new i; i<iNum; i++)
	{
		iPlayer = iPlayers[i]
		if( g_bHltv[iPlayer] )
		{
			if( !bHltv && get_pcvar_num(g_pCvarTraceHltv) == 1 )
			{
				bHltv = true
				message_begin(MSG_SPEC, SVC_TEMPENTITY)
				write_byte ( 0 );
				write_coord(x)
				write_coord(y)
				write_coord(z)
				write_coord_f(fX) 
				write_coord_f(fY) 
				write_coord_f(fZ) 
				write_short( isin );
				write_byte( 1 );
				write_byte( 5);
				write_byte( 1);
				write_byte( 5 );
				write_byte( 0 );
				write_byte( r ); 
				write_byte( g );  
				write_byte( b );   
				write_byte( 200 ); 
				write_byte( 150 ); 
				message_end()
			}
		}
		else if( g_bSeeTracers[iPlayer] )
		{
			
			message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, iPlayer)
			write_byte ( 0 );
			write_coord(x)
			write_coord(y)
			write_coord(z)
			write_coord_f(fX) 
			write_coord_f(fY) 
			write_coord_f(fZ) 
			write_short( isin );
			write_byte( 1 );
			write_byte( 5);
			write_byte( 1);
			write_byte( 5 );
			write_byte( 0 );
			write_byte( r ); 
			write_byte( g );  
			write_byte( b );   
			write_byte( 200 ); 
			write_byte( 150 ); 
			message_end()
			
		}
	}
	#else
	
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
	write_byte ( 0 );
	write_coord( iOrigin[ 0 ] );
	write_coord( iOrigin[ 1 ] );
	write_coord( iOrigin[ 2 ] );
	write_coord_f( flEnd[ 0 ] );
	write_coord_f( flEnd[ 1 ] );
	write_coord_f( flEnd[ 2 ] ); 
	write_short( isin );
	write_byte( 1 );
	write_byte( 3 );
	write_byte( 1);
	write_byte( 5 );
	write_byte( 0 );
	switch( g_Ates[ iAttacker ] )
	{
		case 1: {
			Renk( 255, 0, 0 );
		}
		case 2: {
			Renk( 0, 0, 255 );
		}
		case 3: {
			Renk( 0, 255, 0 );
		}
		case 4: {
			Renk( 255, 255, 0 );
		}
		case 5: {
			Renk( 255, 255, 255 );
		}
		case 6: {
			Renk( 255, 0, 255 );
		}
		case 7: {
			Renk( 255, 170, 255 );
		}
	}
	write_byte( 200 ); 
	write_byte( 150 ); 
	message_end()
	
	#endif
}

stock Renk( Kirmizi, Yesil, Mavi )
{
	write_byte( Kirmizi ); 
	write_byte( Yesil );  
	write_byte( Mavi );  
}
Burda leveli değiştirmek isterseniz, aşağıdaki yer ile oynama yapın.
Not : 30 level değilse kullanamaz. Bunu 30 üstü yapmak istersen "crxranks_get_user_level(iAttacker) < 30" şeklinde yapmalısın.

Kod: Tümünü seç

if(crxranks_get_user_level(iAttacker) != 30)
{
     return
}
Gerçekten sana nasıl teşekkür ederim bilemiyorum ne desem az kalır ne desem az gelir sonsuz kez teşekürler

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
ERRA
Mesajlar: 66
Kayıt: Prş Haz 25, 2020 11:06 pm

Basit istek

Mesaj gönderen ERRA »

orucoglukayra yazdı: Pzt Eki 18, 2021 3:43 pm Hız'ın kaldırılmış hali ;

Kod: Tümünü seç

#pragma semicolon 1

native crxranks_get_user_level(index);

#include <amxmodx>
#include <reapi>

new const g_szModel[][] =
{
	"models/xec/kirmizikanat.mdl",             // Terrorist Hat.
	"models/xec/Kanat.mdl"                    // Counter-Terrorst Hat.
};

new g_iEnt[MAX_PLAYERS+1],g_iModelIndex[sizeof(g_szModel)];

public plugin_init()
{
	register_plugin("Hat for Authorization", "0.1", "` BesTCore;");
	
	RegisterHookChain(RG_CBasePlayer_Spawn, "RG_CBasePlayer_Spawn_Post", .post = true);
	RegisterHookChain(RG_CBasePlayer_TakeDamage, "RG_CBasePlayer_TakeDamage_Post", .post = false);

}
public RG_CBasePlayer_Spawn_Post(id)
{
	if(get_member(id, m_bJustConnected))
	{
		return;
	}
	
	if(crxranks_get_user_level(id) == 33)
	{
		CreateModel(id);
	}
}
public RG_CBasePlayer_TakeDamage_Post(const this, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType)
{
	if(!is_user_connected(pevAttacker) || !rg_is_player_can_takedamage(this, pevAttacker) || this == pevAttacker) 
	{
		return;
	}

	if(crxranks_get_user_level(pevAttacker) == 33)
	{
		SetHookChainArg(4, ATYPE_FLOAT, flDamage*1.3);
	}
}
public CreateHat(const id)
{
	g_iEnt[id] = rg_create_entity("info_target");

	CreateModel(id);
}
public CreateModel(id)
{
	new TeamName:iTeam = get_member(id, m_iTeam);

	switch(iTeam)
	{
		case TEAM_TERRORIST:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[0]);
		}
		case TEAM_CT:
		{
			set_entvar(g_iEnt[id], var_modelindex, g_iModelIndex[1]);
		}
	}
	set_entvar(g_iEnt[id], var_movetype, MOVETYPE_FOLLOW);
	set_entvar(g_iEnt[id], var_aiment, id);
}
RemoveTheHat(const id)
{
	if(!is_nullent(g_iEnt[id]))
	{
		set_entvar(g_iEnt[id], var_flags, FL_KILLME);
		g_iEnt[id] = 0;
	}
}
public client_putinserver(id)
{
	if(crxranks_get_user_level(id) == 33)
	{
		CreateHat(id);
	}
}
public client_disconnected(id)
{
	RemoveTheHat(id);
}
public plugin_precache()
{
	for(new i = 0; i < sizeof(g_szModel); i++)
	{
		g_iModelIndex[i] = precache_model(fmt("%s", g_szModel[i]));
	}
}
Renkli mermi için bu eklentiyi kullanın, sadece 30 leveller kullanabilecek.

Kod: Tümünü seç

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

native crxranks_get_user_level(index);

#define VERSION "1.3.0"

#define MAX_PLAYERS	32
#define IsPlayer(%1)	( 1 <= %1 <= g_iMaxPlayers )
#define write_coord_f(%1)	engfunc(EngFunc_WriteCoord,%1) 

#define m_pActiveItem	373

const GUNS_BITSUM  = ((1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE))
const SHOTGUNS_BITSUM = ((1<<CSW_XM1014)|(1<<CSW_M3))
const SMGS_BITSUM  = ((1<<CSW_MAC10)|(1<<CSW_UMP45)|(1<<CSW_MP5NAVY)|(1<<CSW_TMP)|(1<<CSW_P90))
const RIFFLES_BITSUM  = ((1<<CSW_AUG)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_M249)|(1<<CSW_M4A1)|(1<<CSW_SG552)|(1<<CSW_AK47))
const SNIPERS_BITSUM  = ((1<<CSW_SCOUT)|(1<<CSW_SG550)|(1<<CSW_AWP)|(1<<CSW_G3SG1))

const SILEN_BITSUM	= ((1<<CSW_USP)|(1<<CSW_M4A1))

enum _:PcvarsNum {
	HandGuns = 0,
	ShotGuns,
	SmgGuns,
	RiffleGuns,
	SnipeGuns
}

new const g_iWeaponBitSumList[] = { GUNS_BITSUM , SHOTGUNS_BITSUM , SMGS_BITSUM , RIFFLES_BITSUM , SNIPERS_BITSUM }

new g_iMaxPlayers
new Trie:g_tClassNames

new g_pCvar[PcvarsNum], g_pCvarTraceEnabled, g_pCvarTraceHideSilen

#if defined PER_PLAYER_SETTINGS
new g_bHltv[MAX_PLAYERS+1], g_bSeeTracers[MAX_PLAYERS+1]
new g_pCvarTraceHltv
#endif

new isin;

new g_Ates[ 33 ];

public plugin_precache()
{
	g_tClassNames = TrieCreate()
	
	RegisterHam(Ham_TraceAttack, "worldspawn", "TraceAttack", 1)
	TrieSetCell(g_tClassNames, "worldspawn", 1)
	RegisterHam(Ham_TraceAttack, "player", "TraceAttack", 1)
	TrieSetCell(g_tClassNames, "player", 1)
	
	register_forward(FM_Spawn, "Spawn", 1)
	isin = precache_model( "sprites/dot.spr" );
}

public Spawn( iEnt )
{
	if( pev_valid(iEnt) )
	{
		static szClassName[32]
		pev(iEnt, pev_classname, szClassName, charsmax(szClassName))
		if( !TrieKeyExists(g_tClassNames, szClassName) )
		{
			RegisterHam(Ham_TraceAttack, szClassName, "TraceAttack", 1)
			TrieSetCell(g_tClassNames, szClassName, 1)
		}
	}
}

public plugin_end()
{
	TrieDestroy(g_tClassNames)
}

public plugin_init()
{
	register_plugin("Advanced Weapon Tracers", VERSION, "ConnorMcLeod")
	register_cvar("awt_version", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
	
	g_pCvarTraceEnabled = register_cvar("amx_tracers", "1")
	
	g_pCvar[HandGuns] = register_cvar("amx_trace_handguns", "1")
	g_pCvar[ShotGuns] = register_cvar("amx_trace_shotguns", "1")
	g_pCvar[SmgGuns] = register_cvar("amx_trace_smgguns", "1")
	g_pCvar[RiffleGuns] = register_cvar("amx_trace_riffleguns", "1")
	g_pCvar[SnipeGuns] = register_cvar("amx_trace_snipeguns", "1")
	
	g_pCvarTraceHideSilen = register_cvar("amx_trace_hide_silen", "1")
	#if defined PER_PLAYER_SETTINGS
	g_pCvarTraceHltv = register_cvar("amx_trace_hltv", "1")
	register_clcmd("say /tracers", "ClientCommand_Tracers")
	#endif
	
	g_iMaxPlayers = get_maxplayers()
}

#if defined PER_PLAYER_SETTINGS
public client_putinserver(id)
{
	g_bSeeTracers[id] = !is_user_bot(id)
	g_bHltv[id] = is_user_hltv(id)
	set_task(35.0, "TaskAnnouncement", id)
}

public ClientCommand_Tracers(id)
{
	client_print(id, print_chat, "** [Advanced Weapon Tracers] Tracers are now %s", 
	(g_bSeeTracers[id] = !g_bSeeTracers[id]) ? "ON" : "OFF")
	return PLUGIN_HANDLED
}


public TaskAnnouncement(id)
{
	client_print(id, print_chat, "** [Advanced Weapon Tracers] You can [en/dis]able tracers by typing /tracers in chat")
}
#endif

public TraceAttack(iEnt, iAttacker, Float:flDamage, Float:fDir[3], ptr, iDamageType)
{
	if( !IsPlayer(iAttacker) || get_pcvar_num(g_pCvarTraceEnabled) == 0 )
	{
		return
	}

	if(crxranks_get_user_level(iAttacker) != 30)
	{
		return
	}
	
	new iWeapon = get_user_weapon(iAttacker)
	if( iWeapon == CSW_KNIFE )
	{
		return
	}
	
	new bWeapon = (1<<iWeapon)
	for(new a; a<sizeof(g_iWeaponBitSumList); a++)
	{
		if( bWeapon & g_iWeaponBitSumList[a] )
		{
			if( get_pcvar_num(g_pCvar[a]) )
			{
				break
			}
			else
			{
				return
			}
		}
	}
	
	if( SILEN_BITSUM & bWeapon )
	{
		if( get_pcvar_num(g_pCvarTraceHideSilen) )
		{
			if( cs_get_weapon_silen(get_pdata_cbase(iAttacker, m_pActiveItem)) )
			{
				return
			}
		}
	}
	#if defined TMP_IS_A_SILENCED_WEAPON
	else if( iWeapon == CSW_TMP && get_pcvar_num(g_pCvarTraceHideSilen) )
	{
		return
	}
	#endif
	
	g_Ates[ iAttacker ] += 1;
	if( g_Ates[ iAttacker ] >= 8 )
	{
		g_Ates[ iAttacker ] = 1;
	}
	
	new iOrigin[3], Float:flEnd[3]
	
	get_user_origin(iAttacker, iOrigin, 1)
	get_tr2(ptr, TR_vecEndPos, flEnd)
	
	#if defined PER_PLAYER_SETTINGS
	new iPlayers[MAX_PLAYERS], iNum, iPlayer, bHltv
	new x = iOrigin[0], y = iOrigin[1], z = iOrigin[2]
	new Float:fX = flEnd[0], Float:fY = flEnd[1], Float:fZ = flEnd[2]
	get_players(iPlayers, iNum)
	for(new i; i<iNum; i++)
	{
		iPlayer = iPlayers[i]
		if( g_bHltv[iPlayer] )
		{
			if( !bHltv && get_pcvar_num(g_pCvarTraceHltv) == 1 )
			{
				bHltv = true
				message_begin(MSG_SPEC, SVC_TEMPENTITY)
				write_byte ( 0 );
				write_coord(x)
				write_coord(y)
				write_coord(z)
				write_coord_f(fX) 
				write_coord_f(fY) 
				write_coord_f(fZ) 
				write_short( isin );
				write_byte( 1 );
				write_byte( 5);
				write_byte( 1);
				write_byte( 5 );
				write_byte( 0 );
				write_byte( r ); 
				write_byte( g );  
				write_byte( b );   
				write_byte( 200 ); 
				write_byte( 150 ); 
				message_end()
			}
		}
		else if( g_bSeeTracers[iPlayer] )
		{
			
			message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, iPlayer)
			write_byte ( 0 );
			write_coord(x)
			write_coord(y)
			write_coord(z)
			write_coord_f(fX) 
			write_coord_f(fY) 
			write_coord_f(fZ) 
			write_short( isin );
			write_byte( 1 );
			write_byte( 5);
			write_byte( 1);
			write_byte( 5 );
			write_byte( 0 );
			write_byte( r ); 
			write_byte( g );  
			write_byte( b );   
			write_byte( 200 ); 
			write_byte( 150 ); 
			message_end()
			
		}
	}
	#else
	
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
	write_byte ( 0 );
	write_coord( iOrigin[ 0 ] );
	write_coord( iOrigin[ 1 ] );
	write_coord( iOrigin[ 2 ] );
	write_coord_f( flEnd[ 0 ] );
	write_coord_f( flEnd[ 1 ] );
	write_coord_f( flEnd[ 2 ] ); 
	write_short( isin );
	write_byte( 1 );
	write_byte( 3 );
	write_byte( 1);
	write_byte( 5 );
	write_byte( 0 );
	switch( g_Ates[ iAttacker ] )
	{
		case 1: {
			Renk( 255, 0, 0 );
		}
		case 2: {
			Renk( 0, 0, 255 );
		}
		case 3: {
			Renk( 0, 255, 0 );
		}
		case 4: {
			Renk( 255, 255, 0 );
		}
		case 5: {
			Renk( 255, 255, 255 );
		}
		case 6: {
			Renk( 255, 0, 255 );
		}
		case 7: {
			Renk( 255, 170, 255 );
		}
	}
	write_byte( 200 ); 
	write_byte( 150 ); 
	message_end()
	
	#endif
}

stock Renk( Kirmizi, Yesil, Mavi )
{
	write_byte( Kirmizi ); 
	write_byte( Yesil );  
	write_byte( Mavi );  
}
Burda leveli değiştirmek isterseniz, aşağıdaki yer ile oynama yapın.
Not : 30 level değilse kullanamaz. Bunu 30 üstü yapmak istersen "crxranks_get_user_level(iAttacker) < 30" şeklinde yapmalısın.

Kod: Tümünü seç

if(crxranks_get_user_level(iAttacker) != 30)
{
     return
}
kendimce 33 lvller için ince bir trail kuyruk eklentisini senin atığın örneklerle yapmaya çalıyorumda bakalım umarım başara bilirim herşey için son suz kez teşekür ederim büyük yardımın dokundu <3

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

orucoglukayra
Mesajlar: 209
Kayıt: Pzr Haz 09, 2019 2:48 pm
İletişim:

Basit istek

Mesaj gönderen orucoglukayra »

Rica ederim, iyi kullanımlar.

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
ERRA
Mesajlar: 66
Kayıt: Prş Haz 25, 2020 11:06 pm

Basit istek

Mesaj gönderen ERRA »

orucoglukayra yazdı: Pzt Eki 18, 2021 5:36 pm Rica ederim, iyi kullanımlar.
30 lvllde trail plguni için acaba ufakta olsa birkaç bilgi ayda örnek verirmisiniz zira sürekli hata veriyor bir türlü yapamadım da ben :/

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

orucoglukayra
Mesajlar: 209
Kayıt: Pzr Haz 09, 2019 2:48 pm
İletişim:

Basit istek

Mesaj gönderen orucoglukayra »

Bu işler deneye deneye öğreniliyor.Attığımı inceleyin, anlamadığınız yer olursa tekrar yazabilirsiniz.Bildiğim kadarıyla yardımcı olurum.

Yaptığım işlem, trail eklentisi aldıktan sonra native tanıtıyorum. (Level sorgusu yapmamız için gerekli) ;

Kod: Tümünü seç

native crxranks_get_user_level(index); // Leveli çekmemizi sağlayacak
Daha sonra gerekli yerlere level sorgusu yapıcaz ;

Kod: Tümünü seç

    if(crxranks_get_user_level(id) != 30)
    {
        client_print( id, print_chat, "[CSD] Sadece Level 30lar Bu Menuye Girebilir!" ); 
        return PLUGIN_HANDLED; 
    }

Kod: Tümünü seç

#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < hamsandwich >

native crxranks_get_user_level(index);

#pragma semicolon 1

#define PLUGIN_VERSION "1.0.0"

#define TASKID        81732519124

#define TRAIL_ACTIVE 1
#define TRAIL_INACTIVE 0
#define TRAIL_LIFE 15
#define ACCES_FLAG  ADMIN_ALL

new gTrailSprite;
new gTrailRandomColor[ 33 ][ 3 ];
new bPlayerTrailStatus[ 33 ];
new Float:bflNextCheck[ 33 ];
new const gTrailSpriteIndex[] = "sprites/zbeam2.spr";

const IN_MOVING = IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT | IN_JUMP;

public plugin_init()
{ 
    register_plugin( "Owner Trail", PLUGIN_VERSION, "tuty" );  
    register_forward( FM_CmdStart, "forward_cmdstart" );
    register_clcmd( "say /trail", "cmdMakeOwnerTrail" ); 
    register_clcmd( "say_team /trail", "cmdMakeOwnerTrail" );
    
    RegisterHam(Ham_Spawn, "player", "Fwd_Spawn", 1);
}

public plugin_precache()
{ 
    gTrailSprite = precache_model( gTrailSpriteIndex );
}

public client_connect( id )
{ 
    bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;
}

public Fwd_Spawn(id)
{
    if(get_user_flags(id) & ACCES_FLAG && crxranks_get_user_level(id) == 30)
    {
        bPlayerTrailStatus[id] = TRAIL_ACTIVE;
        
        gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );
        
        set_task(10.0, "change_color", id + TASKID, .flags="b");
    }
}

public change_color(taskid)
{
    new id = taskid - TASKID;
    
    if(!is_user_alive(id))
    {
        remove_task(taskid);
        return;
    }
    
    gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
    gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
    gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );    
}

public cmdMakeOwnerTrail( id )
{ 
    if( !is_user_alive( id ) )
    {  
        client_print( id, print_chat, "[CSD] Öldüğünüzde bu komutu kullanamazsınız!" );  
        return PLUGIN_HANDLED; 
    }  
    if(crxranks_get_user_level(id) != 30)
    {
        client_print( id, print_chat, "[CSD] Sadece Level 30lar Bu Menuye Girebilir!" ); 
        return PLUGIN_HANDLED; 
    }
    if( !( get_user_flags( id ) & ACCES_FLAG ) )
    {  
        client_print( id, print_chat, "[CSD] Bu komuta erişiminiz yok!" );   
        return PLUGIN_HANDLED; 
    } 
    
    if( bPlayerTrailStatus[ id ] == TRAIL_ACTIVE )
    {  
        
        client_print( id, print_chat, "[CSD] Trail Kapatildi." );
        bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;  
        
        UTIL_KillBeamFollow( id );  
        
        bflNextCheck[ id ] = -5000.0;    
        
        return PLUGIN_HANDLED; 
    }  
    
    if( bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) 
    {  
        client_print( id, print_chat, "[CSD] Trail etkinleştirildi! " );  
        
        bPlayerTrailStatus[ id ] = TRAIL_ACTIVE;    
        
        gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );    
        
        return PLUGIN_HANDLED; 
    }  
    
    return PLUGIN_CONTINUE;
}

public forward_cmdstart( id, handle )
{ 
    if( !is_user_alive( id ) || bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) 
    {  
        return FMRES_IGNORED; 
    }

    if(crxranks_get_user_level(id) != 30)
    {
        return FMRES_IGNORED; 
    }
    
    new iButton = get_uc( handle, UC_Buttons ); 
    
    if( !( iButton & IN_MOVING ) ) 
    {
        new Float:flGameTime = get_gametime();   
        if( bflNextCheck[ id ] < flGameTime )
        {   
            UTIL_KillBeamFollow( id );   
            UTIL_BeamFollow( id );
            bflNextCheck[ id ] = flGameTime + ( TRAIL_LIFE / 8 );  
        } 
    }  
    
    return FMRES_IGNORED;
}  

stock UTIL_BeamFollow( const iClient )
{
    message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
    write_byte( TE_BEAMFOLLOW ); 
    write_short( iClient );
    write_short( gTrailSprite ); 
    write_byte( TRAIL_LIFE );
    write_byte( 20 ); 
    write_byte( gTrailRandomColor[ iClient ][ 0 ] ); 
    write_byte( gTrailRandomColor[ iClient ][ 1 ] ); 
    write_byte( gTrailRandomColor[ iClient ][ 2 ] ); 
    write_byte( 255 ); 
    message_end();
}
    
stock UTIL_KillBeamFollow( const iClient )
{ 
    message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
    write_byte( TE_KILLBEAM );     
    write_short( iClient ); 
    message_end();
}

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
ERRA
Mesajlar: 66
Kayıt: Prş Haz 25, 2020 11:06 pm

Basit istek

Mesaj gönderen ERRA »

orucoglukayra yazdı: Sal Eki 19, 2021 7:51 pm Bu işler deneye deneye öğreniliyor.Attığımı inceleyin, anlamadığınız yer olursa tekrar yazabilirsiniz.Bildiğim kadarıyla yardımcı olurum.

Yaptığım işlem, trail eklentisi aldıktan sonra native tanıtıyorum. (Level sorgusu yapmamız için gerekli) ;

Kod: Tümünü seç

native crxranks_get_user_level(index); // Leveli çekmemizi sağlayacak
Daha sonra gerekli yerlere level sorgusu yapıcaz ;

Kod: Tümünü seç

    if(crxranks_get_user_level(id) != 30)
    {
        client_print( id, print_chat, "[CSD] Sadece Level 30lar Bu Menuye Girebilir!" ); 
        return PLUGIN_HANDLED; 
    }

Kod: Tümünü seç

#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < hamsandwich >

native crxranks_get_user_level(index);

#pragma semicolon 1

#define PLUGIN_VERSION "1.0.0"

#define TASKID        81732519124

#define TRAIL_ACTIVE 1
#define TRAIL_INACTIVE 0
#define TRAIL_LIFE 15
#define ACCES_FLAG  ADMIN_ALL

new gTrailSprite;
new gTrailRandomColor[ 33 ][ 3 ];
new bPlayerTrailStatus[ 33 ];
new Float:bflNextCheck[ 33 ];
new const gTrailSpriteIndex[] = "sprites/zbeam2.spr";

const IN_MOVING = IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT | IN_JUMP;

public plugin_init()
{ 
    register_plugin( "Owner Trail", PLUGIN_VERSION, "tuty" );  
    register_forward( FM_CmdStart, "forward_cmdstart" );
    register_clcmd( "say /trail", "cmdMakeOwnerTrail" ); 
    register_clcmd( "say_team /trail", "cmdMakeOwnerTrail" );
    
    RegisterHam(Ham_Spawn, "player", "Fwd_Spawn", 1);
}

public plugin_precache()
{ 
    gTrailSprite = precache_model( gTrailSpriteIndex );
}

public client_connect( id )
{ 
    bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;
}

public Fwd_Spawn(id)
{
    if(get_user_flags(id) & ACCES_FLAG && crxranks_get_user_level(id) == 30)
    {
        bPlayerTrailStatus[id] = TRAIL_ACTIVE;
        
        gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );
        
        set_task(10.0, "change_color", id + TASKID, .flags="b");
    }
}

public change_color(taskid)
{
    new id = taskid - TASKID;
    
    if(!is_user_alive(id))
    {
        remove_task(taskid);
        return;
    }
    
    gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
    gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
    gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );    
}

public cmdMakeOwnerTrail( id )
{ 
    if( !is_user_alive( id ) )
    {  
        client_print( id, print_chat, "[CSD] Öldüğünüzde bu komutu kullanamazsınız!" );  
        return PLUGIN_HANDLED; 
    }  
    if(crxranks_get_user_level(id) != 30)
    {
        client_print( id, print_chat, "[CSD] Sadece Level 30lar Bu Menuye Girebilir!" ); 
        return PLUGIN_HANDLED; 
    }
    if( !( get_user_flags( id ) & ACCES_FLAG ) )
    {  
        client_print( id, print_chat, "[CSD] Bu komuta erişiminiz yok!" );   
        return PLUGIN_HANDLED; 
    } 
    
    if( bPlayerTrailStatus[ id ] == TRAIL_ACTIVE )
    {  
        
        client_print( id, print_chat, "[CSD] Trail Kapatildi." );
        bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;  
        
        UTIL_KillBeamFollow( id );  
        
        bflNextCheck[ id ] = -5000.0;    
        
        return PLUGIN_HANDLED; 
    }  
    
    if( bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) 
    {  
        client_print( id, print_chat, "[CSD] Trail etkinleştirildi! " );  
        
        bPlayerTrailStatus[ id ] = TRAIL_ACTIVE;    
        
        gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );    
        
        return PLUGIN_HANDLED; 
    }  
    
    return PLUGIN_CONTINUE;
}

public forward_cmdstart( id, handle )
{ 
    if( !is_user_alive( id ) || bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) 
    {  
        return FMRES_IGNORED; 
    }

    if(crxranks_get_user_level(id) != 30)
    {
        return FMRES_IGNORED; 
    }
    
    new iButton = get_uc( handle, UC_Buttons ); 
    
    if( !( iButton & IN_MOVING ) ) 
    {
        new Float:flGameTime = get_gametime();   
        if( bflNextCheck[ id ] < flGameTime )
        {   
            UTIL_KillBeamFollow( id );   
            UTIL_BeamFollow( id );
            bflNextCheck[ id ] = flGameTime + ( TRAIL_LIFE / 8 );  
        } 
    }  
    
    return FMRES_IGNORED;
}  

stock UTIL_BeamFollow( const iClient )
{
    message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
    write_byte( TE_BEAMFOLLOW ); 
    write_short( iClient );
    write_short( gTrailSprite ); 
    write_byte( TRAIL_LIFE );
    write_byte( 20 ); 
    write_byte( gTrailRandomColor[ iClient ][ 0 ] ); 
    write_byte( gTrailRandomColor[ iClient ][ 1 ] ); 
    write_byte( gTrailRandomColor[ iClient ][ 2 ] ); 
    write_byte( 255 ); 
    message_end();
}
    
stock UTIL_KillBeamFollow( const iClient )
{ 
    message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
    write_byte( TE_KILLBEAM );     
    write_short( iClient ); 
    message_end();
}
artık ne kadar teşekür etsem azdır size ne desem bilemiyorum ama ben kendimce en son şu şekilde editledim fakat hala sadece 30 lvl için akitf durumda ben 31 lvl ve onun üstü kullanması için sizden bakıp yapmaya çalıştım fakat sadece 30 seviye için aktif. son çare olarak yazıyorum kusura bakmayın gerçekten sürekli hata veriyo ve kod bilgim yetersiz çok özür dillerim.
Bu mesaja eklenen dosyaları görüntülemek için gerekli izinlere sahip değilsiniz.

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

orucoglukayra
Mesajlar: 209
Kayıt: Pzr Haz 09, 2019 2:48 pm
İletişim:

Basit istek

Mesaj gönderen orucoglukayra »

ERRA yazdı: Sal Eki 19, 2021 10:16 pm
orucoglukayra yazdı: Sal Eki 19, 2021 7:51 pm Bu işler deneye deneye öğreniliyor.Attığımı inceleyin, anlamadığınız yer olursa tekrar yazabilirsiniz.Bildiğim kadarıyla yardımcı olurum.

Yaptığım işlem, trail eklentisi aldıktan sonra native tanıtıyorum. (Level sorgusu yapmamız için gerekli) ;

Kod: Tümünü seç

native crxranks_get_user_level(index); // Leveli çekmemizi sağlayacak
Daha sonra gerekli yerlere level sorgusu yapıcaz ;

Kod: Tümünü seç

    if(crxranks_get_user_level(id) != 30)
    {
        client_print( id, print_chat, "[CSD] Sadece Level 30lar Bu Menuye Girebilir!" ); 
        return PLUGIN_HANDLED; 
    }

Kod: Tümünü seç

#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < hamsandwich >

native crxranks_get_user_level(index);

#pragma semicolon 1

#define PLUGIN_VERSION "1.0.0"

#define TASKID        81732519124

#define TRAIL_ACTIVE 1
#define TRAIL_INACTIVE 0
#define TRAIL_LIFE 15
#define ACCES_FLAG  ADMIN_ALL

new gTrailSprite;
new gTrailRandomColor[ 33 ][ 3 ];
new bPlayerTrailStatus[ 33 ];
new Float:bflNextCheck[ 33 ];
new const gTrailSpriteIndex[] = "sprites/zbeam2.spr";

const IN_MOVING = IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT | IN_JUMP;

public plugin_init()
{ 
    register_plugin( "Owner Trail", PLUGIN_VERSION, "tuty" );  
    register_forward( FM_CmdStart, "forward_cmdstart" );
    register_clcmd( "say /trail", "cmdMakeOwnerTrail" ); 
    register_clcmd( "say_team /trail", "cmdMakeOwnerTrail" );
    
    RegisterHam(Ham_Spawn, "player", "Fwd_Spawn", 1);
}

public plugin_precache()
{ 
    gTrailSprite = precache_model( gTrailSpriteIndex );
}

public client_connect( id )
{ 
    bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;
}

public Fwd_Spawn(id)
{
    if(get_user_flags(id) & ACCES_FLAG && crxranks_get_user_level(id) == 30)
    {
        bPlayerTrailStatus[id] = TRAIL_ACTIVE;
        
        gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );
        
        set_task(10.0, "change_color", id + TASKID, .flags="b");
    }
}

public change_color(taskid)
{
    new id = taskid - TASKID;
    
    if(!is_user_alive(id))
    {
        remove_task(taskid);
        return;
    }
    
    gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
    gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
    gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );    
}

public cmdMakeOwnerTrail( id )
{ 
    if( !is_user_alive( id ) )
    {  
        client_print( id, print_chat, "[CSD] Öldüğünüzde bu komutu kullanamazsınız!" );  
        return PLUGIN_HANDLED; 
    }  
    if(crxranks_get_user_level(id) != 30)
    {
        client_print( id, print_chat, "[CSD] Sadece Level 30lar Bu Menuye Girebilir!" ); 
        return PLUGIN_HANDLED; 
    }
    if( !( get_user_flags( id ) & ACCES_FLAG ) )
    {  
        client_print( id, print_chat, "[CSD] Bu komuta erişiminiz yok!" );   
        return PLUGIN_HANDLED; 
    } 
    
    if( bPlayerTrailStatus[ id ] == TRAIL_ACTIVE )
    {  
        
        client_print( id, print_chat, "[CSD] Trail Kapatildi." );
        bPlayerTrailStatus[ id ] = TRAIL_INACTIVE;  
        
        UTIL_KillBeamFollow( id );  
        
        bflNextCheck[ id ] = -5000.0;    
        
        return PLUGIN_HANDLED; 
    }  
    
    if( bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) 
    {  
        client_print( id, print_chat, "[CSD] Trail etkinleştirildi! " );  
        
        bPlayerTrailStatus[ id ] = TRAIL_ACTIVE;    
        
        gTrailRandomColor[ id ][ 0 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 1 ] = random_num( 0, 255 );  
        gTrailRandomColor[ id ][ 2 ] = random_num( 0, 255 );    
        
        return PLUGIN_HANDLED; 
    }  
    
    return PLUGIN_CONTINUE;
}

public forward_cmdstart( id, handle )
{ 
    if( !is_user_alive( id ) || bPlayerTrailStatus[ id ] == TRAIL_INACTIVE ) 
    {  
        return FMRES_IGNORED; 
    }

    if(crxranks_get_user_level(id) != 30)
    {
        return FMRES_IGNORED; 
    }
    
    new iButton = get_uc( handle, UC_Buttons ); 
    
    if( !( iButton & IN_MOVING ) ) 
    {
        new Float:flGameTime = get_gametime();   
        if( bflNextCheck[ id ] < flGameTime )
        {   
            UTIL_KillBeamFollow( id );   
            UTIL_BeamFollow( id );
            bflNextCheck[ id ] = flGameTime + ( TRAIL_LIFE / 8 );  
        } 
    }  
    
    return FMRES_IGNORED;
}  

stock UTIL_BeamFollow( const iClient )
{
    message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
    write_byte( TE_BEAMFOLLOW ); 
    write_short( iClient );
    write_short( gTrailSprite ); 
    write_byte( TRAIL_LIFE );
    write_byte( 20 ); 
    write_byte( gTrailRandomColor[ iClient ][ 0 ] ); 
    write_byte( gTrailRandomColor[ iClient ][ 1 ] ); 
    write_byte( gTrailRandomColor[ iClient ][ 2 ] ); 
    write_byte( 255 ); 
    message_end();
}
    
stock UTIL_KillBeamFollow( const iClient )
{ 
    message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
    write_byte( TE_KILLBEAM );     
    write_short( iClient ); 
    message_end();
}
artık ne kadar teşekür etsem azdır size ne desem bilemiyorum ama ben kendimce en son şu şekilde editledim fakat hala sadece 30 lvl için akitf durumda ben 31 lvl ve onun üstü kullanması için sizden bakıp yapmaya çalıştım fakat sadece 30 seviye için aktif. son çare olarak yazıyorum kusura bakmayın gerçekten sürekli hata veriyo ve kod bilgim yetersiz çok özür dillerim.

Kod: Tümünü seç

if(crxranks_get_user_level(id) >= 31) {
   // Oyuncu 31 levelden buyuk veya esitse calisacak yer
}

Link:
Linklerini gizle
Linki Kopyala
Kilitli