Raised This Month: $51 Target: $400
 12% 

Brass Knuckles (Cheap_Suit)


Post New Thread Reply   
 
Thread Tools Display Modes
VanLi_bRuSly*
Member
Join Date: Mar 2010
Old 06-24-2010 , 08:17   Re: Brass Knuckles (Cheap_Suit)
Reply With Quote #91

no money , yes cost?
VanLi_bRuSly* is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 05-02-2012 , 17:08   Re: Brass Knuckles (Cheap_Suit)
Reply With Quote #92

I made an update for this plugin. Brass Knuckles 2.0
Now updated to version 2.1
Added a few things that i saw were needed for today's server administrators; including CVARs for the cost of the brass knuckles, an update for AMXX 1.8, a few other neat features, MANY necessary optimizations, and Team Attack avoidance.

New Features:
CVARs for cost
automatic show up of BK if knife is out
Server-wide message to say a user bought BK (toggleable)
Help messages/commands
More /buybk commands (make not case sensitive)
Ability to make BK default, instead of knife
Color! Who doesn't love color?
Team Attack avoidance & defines for colors
Removed need to compile locally
Customizable prefix

NOTE: now requires AMX mod X version 1.8 and above. If you wish to change the prefix of the output i.e. [AMX] Liverwiz bought a pair of Brass Knuckles! to [KGN] or something, download the source, change szPrefix to whatever you wish it to be, and compile.
If you want to change the color of the HUD message set the TKHUD[R|G|B] values to the number you wish, corresponding with the RGB value of the color. (directions in source) -default purple


***************
CVARs
***************
brass_knuckles 1 // <0|1> Toggle Brass Knuckles on and off
bk_printall 1 // <0|1> toggle printing the purchase of BK server wide
bk_cost 2500 // <-1-16000> sets the cost of BK (-1 to make them permanent -replace knife)
bk_teamattack 1 // <0|1> Toggle Team Attack workings (reverse knock on TK)


***************
MODULES
***************
amxmodx
cstrike
fakemeta
engine
hamsandwich
colorchat (an include file by ConnorMcLeod) removed in v2.1
Attached Files
File Type: sma Get Plugin or Get Source (liver_brass.sma - 847 views - 15.1 KB)

Last edited by Liverwiz; 09-23-2012 at 12:19. Reason: UPDATE! v2.1
Liverwiz is offline
.BaTmaN
New Member
Join Date: Aug 2012
Old 08-27-2012 , 18:37   Re: Brass Knuckles (Cheap_Suit)
Reply With Quote #93

Could someone put all player win without buying
.BaTmaN is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-28-2012 , 23:40   Re: Brass Knuckles (Cheap_Suit)
Reply With Quote #94

Quote:
Originally Posted by .BaTmaN View Post
Could someone put all player win without buying
Quote:
Originally Posted by Liverwiz View Post
bk_cost 2500 // <-1-16000> sets the cost of BK (-1 to make them permanent -replace knife)
That what you mean?
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
jay7981
Junior Member
Join Date: Jan 2014
Old 05-30-2015 , 22:09   Re: Brass Knuckles (Cheap_Suit)
Reply With Quote #95

i know this is an old plugin but it is throwing tons of errors in the logs and i would like to fix this ...

L 05/27/2015 - 04:19:15: [AMXX] Displaying debug trace (plugin "Brass_Knuckles.amxx")
L 05/27/2015 - 04:19:15: [AMXX] Run time error 4: index out of bounds
L 05/27/2015 - 04:19:15: [AMXX] [0] 9918.attach::Event_DeathMsg (line 47)


Best i can tell it dosent like this ..
Code:
public Event_DeathMsg() 
	g_bknuckles[read_data( 2 )] = 0

Here is the .sma

Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <engine>

new PLUGIN_NAME[] 	= "Brass Knuckles"
new PLUGIN_AUTHOR[] 	= "Cheap_Suit"
new PLUGIN_VERSION[] 	= "1.1"

new g_bknuckles[33]
public plugin_init() 
{
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR )
	
	register_cvar( "amx_bk_enable", "1")
	register_cvar( "amx_bk_cost", 	"50")
	
	register_clcmd( "say /buybk", 	"cmd_BuyBK", 0, "- Buy a brass knuckles" )
	register_concmd( "buybk", 	"cmd_BuyBK", 0, "- Buy a brass knuckles" )
	
	register_event("DeathMsg", 	"Event_DeathMsg", 	"a")
	register_event( "CurWeapon", 	"Event_CurWeapon", 	"be", "1=1" )
	register_event( "Damage", 	"Event_DamageDeath", 	"bd", "2>0" )
	register_event( "Damage", 	"Event_Damage", 	"be", "2>0" )
	
	register_forward( FM_EmitSound, "fw_EmitSound" )
}

public plugin_precache()
{
	precache_model( "models/p_bknuckles.mdl" )
	precache_model( "models/v_bknuckles.mdl" )
	precache_sound( "bknuckles/knife_hit1.wav" )
	precache_sound( "bknuckles/knife_hit2.wav" )
	precache_sound( "bknuckles/knife_hit3.wav" )
	precache_sound( "bknuckles/knife_hit4.wav" )
	precache_sound( "bknuckles/knife_stab.wav" )
}

public client_connect( id ) 
	g_bknuckles[id] = 0

public Event_DamageDeath( id )
	g_bknuckles[id] = 0
	
public Event_DeathMsg() 
	g_bknuckles[read_data( 2 )] = 0

public Event_CurWeapon(id)
{
	if ( !is_user_connected( id ) || !is_user_alive( id ) ) 
		return PLUGIN_CONTINUE
		
	if ( read_data( 2 ) != CSW_KNIFE )
		return PLUGIN_CONTINUE
		
	if ( !g_bknuckles[id] )
		return PLUGIN_CONTINUE
		
	entity_set_string( id, EV_SZ_viewmodel, "models/v_bknuckles.mdl" )
	entity_set_string( id, EV_SZ_weaponmodel, "models/p_bknuckles.mdl" )

	return PLUGIN_CONTINUE
}

public cmd_BuyBK(id)
{
	new Cost = get_cvar_num( "amx_bk_cost" ), Money = cs_get_user_money( id )
	if ( !get_cvar_num( "amx_bk_enable" ) )
		client_print( id, print_chat, "Sorry, brass knuckles is currently off" )
	else if ( !is_user_alive( id ) )
		client_print( id, print_chat, "Sorry, You need to be alive" )
	else if ( Money < Cost )
		client_print( id, print_chat, "Sorry, You need $%d to buy", Cost ) 
	else if ( g_bknuckles[id] )
		client_print( id, print_chat, "Sorry, You already bought a pair of brass knuckles" )
	else
	{
		g_bknuckles[id] = 1
		cs_set_user_money( id, Money - Cost )
		client_print( id, print_chat, "You bought a pair of brass knuckles" )
		
		new temp[2], weapon = get_user_weapon( id, temp[0], temp[1] )
		if( weapon == CSW_KNIFE )
		{
			entity_set_string( id, EV_SZ_viewmodel, "models/v_bknuckles.mdl" )
			entity_set_string( id, EV_SZ_weaponmodel, "models/p_bknuckles.mdl" )
		}
	}
	return PLUGIN_HANDLED
}
	
public Event_Damage( id )
{
	if ( !is_user_alive( id ) || !is_user_connected( id ) ) 
		return PLUGIN_CONTINUE
		
	new AttakerWeapon, AttakerPartHit
	new Attacker = get_user_attacker( id, AttakerWeapon, AttakerPartHit )
	
	if ( AttakerWeapon != CSW_KNIFE )
		return PLUGIN_CONTINUE
	
	if ( !g_bknuckles[Attacker] )
		return PLUGIN_CONTINUE
	
	new Float:RandomFloat[3]
	for( new i = 0; i < 3; i++ ) RandomFloat[i] = random_float( -100.0, 150.0 )
	entity_set_vector( id, EV_VEC_punchangle, RandomFloat )

	return PLUGIN_CONTINUE
}

public fw_EmitSound( id, channel, sample[] )
{
	if ( !is_user_alive( id ) || !is_user_connected( id ) ) 
		return FMRES_IGNORED

	new temp[2], weapon = get_user_weapon( id, temp[0], temp[1] )
	if ( weapon != CSW_KNIFE )
		return FMRES_IGNORED
		
	if ( !g_bknuckles[id] )
		return FMRES_IGNORED
		
	if ( equal( sample, "weapons/knife_hit1.wav" ) ) 
	{
		emit_sound( id, CHAN_WEAPON, "bknuckles/knife_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM )
		return FMRES_SUPERCEDE
	}
	else if ( equal ( sample, "weapons/knife_hit2.wav" ) ) 
	{
		emit_sound( id, CHAN_WEAPON, "bknuckles/knife_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM )	
		return FMRES_SUPERCEDE
	}
	else if ( equal( sample, "weapons/knife_hit3.wav" ) ) 
	{
		emit_sound( id, CHAN_WEAPON, "bknuckles/knife_hit3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM )	
		return FMRES_SUPERCEDE
	}
	else if ( equal( sample, "weapons/knife_hit4.wav" ) ) 
	{
		emit_sound( id, CHAN_WEAPON, "bknuckles/knife_hit4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM )
		return FMRES_SUPERCEDE
	}
	else if ( equal( sample, "weapons/knife_stab.wav") ) 
	{
		emit_sound( id, CHAN_WEAPON, "bknuckles/knife_stab.wav", 1.0, ATTN_NORM, 0, PITCH_NORM )	
		return FMRES_SUPERCEDE
	}
	return FMRES_IGNORED
}
jay7981 is offline
swordsswords
New Member
Join Date: Oct 2023
Old 10-10-2023 , 05:01   Re: Brass Knuckles (Cheap_Suit)
Reply With Quote #96

We are your ultimate destination for high-quality Brass Knuckles. Our extensive collection covers nearly every type of Real Brass Knuckle imaginable, ensuring that you'll find the perfect fit for your unique preferences.

https://swordsswords.com/self-defense/brass-knuckles/

Last edited by swordsswords; 10-10-2023 at 05:02.
swordsswords is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode