In your onCreated() function, you are using the equality operator (==) to assign a value. This will not work. When assigning values to variables, use a single equality sign. This also applies to your onPlayerChats() function. Also, since you're setting this.timer (you might want to change the name as well, I bet that's reserved) in onPlayerChats(), it seems a bit redundant to also do that in onCreated().
Next, you'll want to decrement a variable by using either of these two methods:
PHP Code:
this.var--;
this.var -= 1;
What you're doing in your timeout will not work. Finally, you should probably check inside your timeout if the countdown has reached zero and, if it has, do not continue the timeout.