Raised This Month: $ Target: $400
 0% 

The Specialists - Brass Knuckles (Melee_Attack Usage)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Calimaw
Junior Member
Join Date: Dec 2006
Old 12-31-2006 , 05:04   Re: The Specialists - Brass Knuckles (Melee_Attack Usage)
Reply With Quote #1

As to why it says it 5 times, Im not sure, but my first stab at it would be that the attack is repeated 4 times during its life time? Like if you strike at a wall with some one behind you, and you turn quickly enough, it will catch them too.

EDIT: Found out what it is. It's when you hold the button down it keeps repeating.

I don't know how to fix that yet, but I fixed a few other things.

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") } 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 }

Last edited by Calimaw; 12-31-2006 at 05:35.
Calimaw 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 22:22.


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