you can use engine_taskinfo:
Code:
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!

Last edited by MasterQ32; 01/17/12 23:11. Reason: Changed suggested things by sid

Visit my site: www.masterq32.de