Hi!
Just wandering if it is at all possible to name a timer which is using Oxide's Timer Library and Destroy it later if needed before the time elapses using its name? If so, what is the general method to do this?
Cheers!
Solved Name a timer to destroy later? (C#)
Discussion in 'Rust Development' started by JoeSheep, May 25, 2016.
-
Wulf Community Admin
Sure, just set it in a variable and then destroy that variable later.
-
Ok, thanks.
I have been trying to come up with an idea of how to destroy a specific player's GUI/timer and not everyone else's. So I thought perhaps I could use their name to prefix a timer and create it. Would creating multiple timers put a significant enough load on the server to reduce performance? -
Wulf Community Admin
-
Yeah if you wanted a semi example you can check my most recent plugin
-
My GUI will need to be destroyed after a certain amount of time though. Should I still look at them as an example?
-
Wulf Community Admin
-
Also I got a timer stored in a variable and destroyed it successfully just now -
I was gonna say store the timer in the dictionary but that works lol
-
I will still need to use a dictionary to store timers private to players.
-
Ah lol ok
-
Wulf Community Admin
-