How to send a BuddyPress user a notification on a plugin event? [closed]

First you need to setup component for this:

function notifier_setup_globals() {
    global $bp, $current_blog;
    $bp->notifier = new stdClass();
    $bp->notifier->id = 'notifier';
    $bp->notifier->slug = 'notifier';
    $bp->notifier->notification_callback = 'bp_notifier_format_notifications';//this is a function which gets notifications
    $bp->active_components[$bp->notifier->id] = $bp->notifier->id;

    do_action( 'notifier_setup_globals' );
}
add_action( 'bp_setup_globals', 'notifier_setup_globals' );

To add notifications call something like this inside your action:

bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false, $is_new = 1 ) ;

where $component_name in this case is notifier.

for farther reading: http://demo.myndconsulting.com/documentation/notification-functions/