Posts: 1,072
Threads: 168
Joined: Aug 2012
Reputation:
0
Hello, some time ago i made it so if you smoke more than the choosen ammount of cigarettes you get cancer wich will slowly drain your health.. Well now i want to make it so if you smoke over example 20 cigarettes you become addicted and after a while if you dont smoke the screen will be weird or something. But what im wondering is.. Can i use timers for that? And then kill the timer when i use /smoke again so the timer restarts or will the timer stop and nothing more will happen after that?
Posts: 371
Threads: 8
Joined: Aug 2012
yes you can use timer to check if the player is addicted or not
Posts: 1,072
Threads: 168
Joined: Aug 2012
Reputation:
0
So i with the killtimer thing i will only restart it? I mean so it will work again after lets say 1 hour
Posts: 371
Threads: 8
Joined: Aug 2012
Posts: 1,151
Threads: 46
Joined: Jan 2013
Reputation:
0
You can make a timer of 1 hour. And when 1 hour had happened check if the player has X of a variable and then if for example the player has 100 of 'X' variable put some functions to the player and the timer must be in 'true'. And i don't know, if the player smokes a cigarette the variable will go down.