Quote:
while(my.hp > 0) // while I'm alive
{
ent_create("sword.mdl",my.x,attach_weapon);
wait(1);


well, you create a weapon every frame.
Only create it once, and delete it when the player is dead

just call the ent_create("sword.mdl",my.x,attach_weapon); before the while loop