Raised This Month: $ Target: $400
 0% 

The Specialists - Brass Knuckles (Melee_Attack Usage)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
|POW|Da_ghost
Senior Member
Join Date: Nov 2006
Location: http://snarkcafe.net
Old 12-31-2006 , 10:11   Re: The Specialists - Brass Knuckles (Melee_Attack Usage)
Reply With Quote #1

Well the error is because you had 2 extra "{" so here is the new one.
Code:
#include <amxmodx> #include <fakemeta> #include <tsfun> #define PLUGIN "Brass Knuckles" #define VERSION "1.0" #define AUTHOR "Calimaw/stupok69" new bool:g_brassknuckles[33] new bool:g_is_in_kungfu[33] public plugin_init() {  register_plugin(PLUGIN, VERSION, AUTHOR)  register_message(get_user_msgid("WeaponInfo"), "WeaponInfo_function")  register_event("DeathMsg", "Event_Death", "a")  register_forward(FM_PlayerPreThink, "PlayerPreThink")  register_clcmd("say /brassknuckles", "cmdBrassKnuckles")  register_forward(FM_EmitSound, "EmitSound") } public plugin_precache() {  precache_sound("bknuckles/hit_01.wav")  precache_sound("bknuckles/swing_01.wav") } public client_connect(id) {  g_brassknuckles[id] = false  g_is_in_kungfu[id] = true } public Event_Death() {  new id = read_data(2)  g_brassknuckles[id] = false  g_is_in_kungfu[id] = true } public WeaponInfo_function(msg_id, msg_dest, msg_entity) {  if(!get_msg_arg_int(1))  {   g_is_in_kungfu[msg_dest] = true  }  else  {   g_is_in_kungfu[msg_dest] = false  } } public cmdBrassKnuckles(id) {  if(!is_user_alive(id))   client_print(id, print_chat, "The dead cannot buy items!")  else if(g_brassknuckles[id])   client_print(id, print_chat, "What good would that do?")  else  {   g_brassknuckles[id] = true   client_print(id, print_chat, "You bought a pair of brass knuckles!")  }  return PLUGIN_HANDLED } public PlayerPreThink(id) {  if(!is_user_alive(id))   return FMRES_IGNORED  else if(!g_brassknuckles[id])   return FMRES_IGNORED    if(pev(id,pev_button) & IN_ATTACK && g_is_in_kungfu[id])  {   client_print(id, print_chat, "You attack like viper! Rrrrr")  }    return FMRES_HANDLED } public EmitSound(id, channel, sample[]) {  if(!is_user_alive(id))   return FMRES_IGNORED    if(g_brassknuckles[id])  {   if(equal(sample,"player/kungfuhit.wav"))   {    emit_sound(id, CHAN_WEAPON, "bknuckles/hit_01.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    return FMRES_SUPERCEDE   }   else if(equal(sample,"player/closecombat.wav"))   {    emit_sound(id, CHAN_WEAPON, "bknuckles/swing_01.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    return FMRES_SUPERCEDE   }  }  return FMRES_IGNORED }
__________________
If you want me to help you with something please contact me on msn or xfire(Daghost1337)
|POW|Da_ghost is offline
Send a message via AIM to |POW|Da_ghost Send a message via MSN to |POW|Da_ghost
Old 12-31-2006, 11:23
Hawk552
This message has been deleted by sawce the snail. Reason: thread derailment
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 22:22.


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