Pretty sure it should be $npc->GetNPCFactionID. Suggestion below. Personal preference, but when you post code would you mind putting it in better formatting, looks really bad when everything's jumbled together.
This:
Code:
($h_ent->GetCharacterFactionLevel(GetNPCFaction()) > 1)
Becomes this:
Code:
($h_ent->GetCharacterFactionLevel($npc->GetNPCFactionID()) > 1)
For future reference, Objects are located
here.