Problem with timer (SWEP)

I made a stun stick for DarkRP. Every attack on spesific player adds 1 stack on him. If stack get bigger than 5 -a function runs-.

But I want to make a timer if attacker did not attacked to player for 10 seconds, stacks will reset and its in swep.

you can show example with these variables:

ply.stack -- for show ply's stack
swep.howmuchpast -- for show how much past (if this variable more than 10 ply.stack = 0)

Use the weapon’s think hook to check the last swing time

how can I access the ply.stack in weapon think hook


Not owners stack, player who been attacked

attacked player.stack