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:
[CODE]
ply.stack -- for show ply's stack
swep.howmuchpast -- for show how much past (if this variable more than 10 ply.stack = 0)
[/CODE]
Use the weapon's think hook to check the last swing time
how can I access the ply.stack in weapon think hook
[QUOTE=Moat;51503209]self.Owner.stack?[/QUOTE]
Not owners stack, player who been attacked
attacked player.stack
Sorry, you need to Log In to post a reply to this thread.