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 , 06:10   Re: The Specialists - Brass Knuckles (Melee_Attack Usage)
Reply With Quote #1

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 }

Made some more problems to solve, Im using Cheap_Suits CS Brass Knuckls plugin as a refference point to learn from, but alot of it is useless towards TS due to the differences in the mods, so If his isnt the correct way for TS, I dont know which is. This script won't compile on lines 85-86, I don't know what the error means.
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