5 parts:
Code:
//1: a server command in the init function
public plugin_init() {
register_srvcmd("item_hit","item_hit");
}
//2: a public function for the item
public item_hit() {
//3: reading arg to get id
new arg[32];
read_argv(1, arg, 31);
new id = str_to_num(arg);
new name[32];
get_user_name(id, name, 31);
//4: printing it out (0 = to everyone, %s = their name)
client_print(0,print_chat,"[Hit] %s is going to do a Hit!",name);
return PLUGIN_HANDLED;
}
5: In the sql, make an item, and have the command be:
item_hit <id>
__________________