you can use engine_taskinfo:
var num = 0;
ENTITY* ent;
char* funcname;
for(num = 0; engine_gettaskinfo(num,&funcname,&ent); num++)
{
if(ent == you)
{
funcname now is your action name
return here or search for another action which is running [Thanks to Sid!]
}
}
code is untested but should work)
EDIT:
The code above finds all functions and actions for you, not only the first action!