How do I prevent the character from sprinting when the stamina value is 0?

I, personally, don’t understand what you mean? (I mean, I do, but I don’t understand why it’s an issue for you.)

Could you elaborate?