Cerere plugin hammer

Cereri de resurse: addons-uri, modele, sunete, etc.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
User avatar
Astaroth
Membru, skill +1
Membru, skill +1
Posts: 140
Joined: 24 Aug 2017, 15:38
Detinator Steam: Da
CS Status: .....
Detinator server CS: FURIEN.FREAKZ.RO
SteamID: AstarothRTH
Fond eXtream: 0
Contact:

24 Apr 2018, 17:10

Salut! Doresc si eu pluginul + sursa de la ciocanul asta din cso https://m.imgur.com/jeLVO
Ps: Am nevoie de el pentru serverul de furien, in niciun caz pentru zombie.
<< Tranzactii efectuate cu succes >>

Code: Select all

1. https://www.extreamcs.com/forum/security-zone/astaroth-tepar-t347242.html 

Code: Select all

2.https://www.extreamcs.com/forum/anunturi/dau-paysafecard-paypal-t355179.html
Vand frustrat la 10 euro. Pret negociabil
cs_all wrote: Atunci o sa-mi pun si eu admini sa vina sa iti faca reclama si nu doar 1 :middle_finger:
| Afiseaza codul
furien.kniferz.ro server intretinut din tepe, good job cs_all aka "bani de boost"
http://www.extreamcs.com/forum/security ... 55999.html
http://www.extreamcs.com/forum/security ... 55873.html
http://www.extreamcs.com/forum/security ... 55993.html
IG-BOOST.org - Instagram Followers Best, Cheap, Reliable
User avatar
Sorinel
Fost moderator
Fost moderator
Posts: 5251
Joined: 25 Aug 2014, 20:31
Detinator Steam: Da
CS Status: All i ever wanted was a Rolli Rolli
SteamID: Jandarmeria
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Christmas, A k c 3 n 7
Fond eXtream: 0
Location: Ploiesti
Been thanked: 5 times

24 Apr 2018, 17:43

vezi cu asta, modelele le gasesti pe net
| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
//#include <biohazard>
//#include <bio_shop>

#define PLUGIN "[Bio] Shop: Hammer"
#define VERSION "1.0"
#define AUTHOR "Dias"

#define is_user_valid_connected(%1) (1 <= %1 <= get_maxplayers() && is_user_connected(%1))

new const v_model[] = "models/biohazard/v_hammer.mdl"
new const p_model[] = "models/biohazard/p_hammer.mdl"

new bool:had_hammer[33]
new g_attacking[33]

//new g_hammer

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Item_Deploy, "weapon_knife", "fw_hammer_deploy")
	RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fw_hammer_pri_attack")
	RegisterHam(Ham_TakeDamage, "player", "fw_hammer_takedmg")
	RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_SecondaryAttack")
	RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_SecondaryAttack_Post", 1)	
	RegisterHam(Ham_Spawn, "player", "fw_spawn_post", 1)
	
	register_forward(FM_TraceLine, "fw_TraceLine")
	register_forward(FM_TraceHull, "fw_TraceHull")	
	
	register_event("CurWeapon", "event_curweapon", "be", "1=1")
	register_clcmd("lastinv", "check_lastinv")
	
	//g_hammer = bio_register_item("Hammer", 9500, "Attack far enemy and x5 dmg", TEAM_HUMAN)
}

public plugin_precache()
{
	engfunc(EngFunc_PrecacheModel, v_model)
	engfunc(EngFunc_PrecacheModel, p_model)
}

public bio_item_selected(id, item)
{
	if(item == g_hammer)
	{
		had_hammer[id] = true
		engclient_cmd(id, "weapon_knife")
	}
}

public fw_spawn_post(id)
{
	had_hammer[id] = false
}

public event_infect(id)
{
	had_hammer[id] = false
}

public fw_hammer_deploy(ent)
{
	static id
	id = pev(ent, pev_owner)
	
	if(is_user_alive(id) && had_hammer[id])
		play_weapon_anim(id, 1)
}

public check_lastinv(id)
{
	if(get_user_weapon(id) == CSW_KNIFE && had_hammer[id])
		play_weapon_anim(id, 1)
}

public event_curweapon(id)
{
	if(!is_user_alive(id) || get_user_weapon(id) != CSW_KNIFE)
		return PLUGIN_HANDLED
		
	//if(is_user_zombie(id))
	//	return PLUGIN_HANDLED
	
	if(!had_hammer[id])
		return PLUGIN_HANDLED
	
	set_pev(id, pev_viewmodel2, v_model)
	set_pev(id, pev_weaponmodel2, p_model)
	
	return PLUGIN_CONTINUE
}

public fw_hammer_pri_attack(ent)
{
	if(!pev_valid(ent))
		return HAM_IGNORED
	
	static id
	id = pev(ent, pev_owner)
	
	if(!had_hammer[id])
		return HAM_IGNORED
	
	play_weapon_anim(id, 0)
	
	return HAM_SUPERCEDE
}

public fw_hammer_takedmg(victim, inflictor, attacker, Float:damage, damagebits)
{
	if(!is_user_alive(victim) || !is_user_alive(attacker))
		return HAM_IGNORED
		
	//if(!is_user_zombie(victim))
	//	return HAM_IGNORED
		
	if(!had_hammer[attacker])
		return HAM_IGNORED
		
	SetHamParamFloat(4, damage * 5.0)
	
	return HAM_HANDLED
}

public fw_SecondaryAttack(weapon_ent)
{
	// Not valid
	if (!pev_valid(weapon_ent))
		return;
	
	// Get owner
	static owner
	owner = pev(weapon_ent, pev_owner)
	
	// Replace these for zombie only
	if (!is_user_valid_connected(owner))
		return;
	
	g_attacking[owner] = 2
}

public fw_SecondaryAttack_Post(weapon_ent)
{
	// Not valid
	if (!pev_valid(weapon_ent))
		return;
	
	// Get owner
	static owner
	owner = pev(weapon_ent, pev_owner)
	
	// Replace these for zombie only
	if (!is_user_valid_connected(owner))
		return;
	
	g_attacking[owner] = 0
}

public fw_TraceLine(Float:vector_start[3], Float:vector_end[3], ignored_monster, id, handle)
{
	// Replace these for zombie only
	if (!is_user_valid_connected(id))
		return FMRES_IGNORED;
	
	// Not alive
	if (!is_user_alive(id))
		return FMRES_IGNORED;
	
	// Not using knife
	if (get_user_weapon(id) != CSW_KNIFE)
		return FMRES_IGNORED;
		
	if(!had_hammer[id])
		return FMRES_IGNORED		
	
	// Not attacking
	if (!g_attacking[id])
		return FMRES_IGNORED;
	
	pev(id, pev_v_angle, vector_end)
	angle_vector(vector_end, ANGLEVECTOR_FORWARD, vector_end)
	
	if (g_attacking[id] == 1)
		xs_vec_mul_scalar(vector_end, 70.0, vector_end)
	else
		xs_vec_mul_scalar(vector_end, 85.0, vector_end)
	
	xs_vec_add(vector_start, vector_end, vector_end)
	engfunc(EngFunc_TraceLine, vector_start, vector_end, ignored_monster, id, handle)
	
	return FMRES_SUPERCEDE;
}

public fw_TraceHull(Float:vector_start[3], Float:vector_end[3], ignored_monster, hull, id, handle)
{
	// Replace these for zombie only
	if (!is_user_valid_connected(id))
		return FMRES_IGNORED;
	
	// Not alive
	if (!is_user_alive(id))
		return FMRES_IGNORED;
	
	// Not using knife
	if (get_user_weapon(id) != CSW_KNIFE)
		return FMRES_IGNORED;
		
	if(!had_hammer[id])
		return FMRES_IGNORED
	
	// Not attacking
	if (!g_attacking[id])
		return FMRES_IGNORED;
	
	pev(id, pev_v_angle, vector_end)
	angle_vector(vector_end, ANGLEVECTOR_FORWARD, vector_end)
	
	if (g_attacking[id] == 1)
		xs_vec_mul_scalar(vector_end, 70.0, vector_end)
	else
		xs_vec_mul_scalar(vector_end, 85.0, vector_end)
	
	xs_vec_add(vector_start, vector_end, vector_end)
	engfunc(EngFunc_TraceHull, vector_start, vector_end, ignored_monster, hull, id, handle)
	
	return FMRES_SUPERCEDE;
}

stock play_weapon_anim(player, anim)
{
	set_pev(player, pev_weaponanim, anim)
	message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, player)
	write_byte(anim)
	write_byte(pev(player, pev_body))
	message_end()
}
User avatar
Astaroth
Membru, skill +1
Membru, skill +1
Posts: 140
Joined: 24 Aug 2017, 15:38
Detinator Steam: Da
CS Status: .....
Detinator server CS: FURIEN.FREAKZ.RO
SteamID: AstarothRTH
Fond eXtream: 0
Contact:

26 Apr 2018, 13:52

E ok. T/C
<< Tranzactii efectuate cu succes >>

Code: Select all

1. https://www.extreamcs.com/forum/security-zone/astaroth-tepar-t347242.html 

Code: Select all

2.https://www.extreamcs.com/forum/anunturi/dau-paysafecard-paypal-t355179.html
Vand frustrat la 10 euro. Pret negociabil
cs_all wrote: Atunci o sa-mi pun si eu admini sa vina sa iti faca reclama si nu doar 1 :middle_finger:
| Afiseaza codul
furien.kniferz.ro server intretinut din tepe, good job cs_all aka "bani de boost"
http://www.extreamcs.com/forum/security ... 55999.html
http://www.extreamcs.com/forum/security ... 55873.html
http://www.extreamcs.com/forum/security ... 55993.html
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest