Posts: 120
Threads: 22
Joined: Jul 2011
Reputation:
0
But I need x to get to zero and until it does I want the x to decrease, because I am setting the timer to 60000
Posts: 120
Threads: 22
Joined: Jul 2011
Reputation:
0
So make it every 1000 milliseconds and make it repeat?
Posts: 1,781
Threads: 13
Joined: Sep 2009
Reputation:
0
may i ask how you are calling the timer? if you call it like
Timer(playerid,60000);
then the x=time will get x set to 60000, then in the loop, x changes to 59999 until it reaches 0. this will take some time (60000 x 1000 ms = 60000 seconds. thats 1000 minutes?)
now i woudl like to know how/when the next call happens. setting the timer to 1ms wont work btw. iam afraid youll need a different way to do whatever you want to do. setting a player position to blueberry acres, below ground, doesnt sound like a good idea btw.
now i have read the post again where you state that you call the timer with 1000 as parameter. this means, the timer snippet will set the players position 1000 times to 0,0,0? thats horrible. please let us know what you want to achieve with this. iam sure there are more clever methods to do whatever wou want.
using the GetTickCount() f.ex, saved me using a lot of timers (which take more CPU time than just calling 1 function to retrieve an always increasing server-runtime value (in ms) ).
if the player is supposed to do ANY action (pressing a key, typing a command, whatever), then the timer can be left out.