Raised This Month: $ Target: $400
 0% 

The Specialists - Brass Knuckles (Melee_Attack Usage)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Calimaw
Junior Member
Join Date: Dec 2006
Old 12-31-2006 , 03:02   The Specialists - Brass Knuckles (Melee_Attack Usage)
Reply With Quote #1

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <tsx> #include <tsfun> #define PLUGIN "Brass Knuckles" #define VERSION "1.0" #define AUTHOR "Calimaw" new bool:g_brassknuckles[33] public plugin_init() {  register_plugin(PLUGIN, VERSION, AUTHOR)  register_clcmd("say /brassknuckles", "cmdBrassKnuckles") } public client_connect(id) g_brassknuckles[id] = false public Event_Death() g_brassknuckles[read_data(2)] = 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 Melee_Attack (id, Float:time, Float:damage) {  client_print(id, print_chat, "You attack like viper! Rrrrr")  return PLUGIN_CONTINUE }

The above code is the begining of my very first plugin, and I'm still very terrible

The portion that doesnt work thus far is the very bottom block, at public Melee_Attack.

What it should do is display the message "You attack like viper! Rrrrrr!" (for testing) when using Kung Fu, and when you have the brass knuckles.

Currently I was just trying to get it to work with ANY melee attack regardless of knuckles or not, and I cant even get that working.

Last edited by Calimaw; 12-31-2006 at 05:37.
Calimaw is offline
 



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