ok so am making a plugin were the cratekey spins then stops after 1-2m , how can i stop the repeating task in 1-2m to disable?
a stop task, to terminate the repeating task Code: function issuerepeat($repeatingTaskParams...,$whenToStop){ $id = mtrand() while $this->repeats[$id] is set, $id = mtrand() $this->repeats[$id] = (register repeating task(which returns handler, we will set that as the handler)) (register single delayed task with $id) } function stopById($id){(this is where the task will call with the provided ID) if isset $this->repeats[$id] $this->repeats[$id]->(clear/stop? cant remember exact method) unset($this->repeats[$id]) endif } Note, this is clearly obviously not meant to be copied, and methods may not be exact, nor correct, this only should be ever served as an example and you should tweak where it feels necessary to
have you learnt PHP or PHP OOP before? it might worth taking a break and learning that first function is used for non oop programming sty;e, also here's a link about visibilitity, http://php.net/manual/en/language.oop5.visibility.php this pretty much tell you all you need to know about these keywords