find ::
PHP Code:
if (!$touserinfo['receivepm'] or !$touserinfo['canusepm']) {
eval("standarderror(\"".gettemplate("error_pmrecipturnedoff")."\");");
exit;
}
under it add:
PHP Code:
if(($touserinfo[usergroupid] != $bbuserinfo[usergroupid]) OR ($bbuserinfo[usergroupid] != 6)) {
eval("standarderror(\"".gettemplate("error_pmrestricted")."\");");
exit;
}
that should do the trick

it allows Administrators to pm anyone and allows only certain usergroups to pm another user in that same usergroup

thats all... don't forget to make a new template call it ::
error_pmrestricted
and put whatever info you want in the template (error-wise) regards
oh and one more thing... make sure to disable pming to buddies ;p or you could make a similiar code when adding buddies... else they can foward messages and such... to disable simply in the usergroup set max pm to forward and max users to pm at 0...
g-force2k2