you were absolutly right.
the animation ends here:

IF (my.animate >= 60)
{
ent_animate(my,"equip",60,0);
my.animate = 60; /// animation ends here

Then what you have said:

IF (equip_sword == 1) {equip_sword = 0;} ELSE{ equip_sword = 1;}

bye
fp