Unfortunately it didnt work with handcuffs enabled.
I tried it like this:
if (AI::GET_IS_TASK_ACTIVE(peds[i], 399)) //is ped hogtied?
{
AI::CLEAR_PED_TASKS_IMMEDIATELY(peds[i], false, false); //clear all tasks (make hogtie disappear)
PED::SET_ENABLE_HANDCUFFS(peds[i], true, false); //bind hands
PED::SET_ENABLE_BOUND_ANKLES(peds[i], true); //bind ankles
}
But only the hands were bound (but when the NPC attacks me, the hands still glitch into Arthurs face for a split second - so they can still fight handcuffed).