Code:
void myFunc ()
{
error("myFunc");
}

//save function pointer
my.skill1 = (void*)myFunc;

//create entity with function pointer
ent_create("bla.mdl", nullvector, (void*)my.skill1);

//execute function pointer
void (*func)(void);
func = (void*)my.skill1;
func();