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.