mob/proc/hit()
if(src.punching==10 || src.kicking==10) src.hits+=20
if(hits>=20) GiveLevels(1)
resethits()
mob/proc/resethits()
hits=0
Problem description:
How do I make the hits reset without me stopping from hitting? Because I want it to give levels continuously whenever I hit something 20 times apparently if I don't stop from hitting after gaining a level I don't gain any levels anymore after I hit 20 more and more. So I wanted to know how to make it reset without me stopping from hitting.
However, what you're asking isn't very clear so I'm unsure if that's what you even want. The code you posted doesn't really make much sense out of context nor does the description you posted.