Doom_real Posted February 5, 2011 Author Share Posted February 5, 2011 Hi.I wonder if its possible to make timers in vb6 and if its possible how?For example i want to make a buff spel and i need to put it a timer so after 2 mins the buff disappear. Link to comment Share on other sites More sharing options...
thezeus Posted February 5, 2011 Share Posted February 5, 2011 Timers are a very simple feature in VB6. If you don't know this, you really need to learn the basics. Link to comment Share on other sites More sharing options...
Doom_real Posted February 5, 2011 Author Share Posted February 5, 2011 Ok that helped me alot… Link to comment Share on other sites More sharing options...
damian666 Posted February 5, 2011 Share Posted February 5, 2011 even if that was'nt very helpfull, he is right…timers are a simple control, which you set the frikking time duration for...so yeah, back to basics for you my friend xdDami Link to comment Share on other sites More sharing options...
Robin Posted February 5, 2011 Share Posted February 5, 2011 Don't use timer controls. Use the GetTickCount timing system I use in Origins. Link to comment Share on other sites More sharing options...
thezeus Posted February 5, 2011 Share Posted February 5, 2011 Even still, when starting out you should at least search youtube for Visual Basics 6 Tutorials to simply learn the basics. Link to comment Share on other sites More sharing options...
Doom_real Posted February 5, 2011 Author Share Posted February 5, 2011 I watched some tutorials but those are with timers on a form that can be enabled or not.I don't know how can i use that in Modcombat.Im interested in that GetTickCount Robin just mentioned.Can you give me an example on how to use it or an tutorial that lean you how to use it please? Link to comment Share on other sites More sharing options...
Robin Posted February 5, 2011 Share Posted February 5, 2011 Just search for 'GetTickCount' in the source. >_> Link to comment Share on other sites More sharing options...
Doom_real Posted February 5, 2011 Author Share Posted February 5, 2011 Ok.I tried to make an code with GetTickCount.Like this:``` Case SPELL_TYPE_BUFF c = 1 If targetType = TARGET_TYPE_PLAYER Then Do While c < 4 If Vital > 0 Then If Tick > msg Then SendActionMsg GetPlayerMap(index), "haha", Red, 1, (GetPlayerX(index) * 32), (GetPlayerY(index) * 32) c = c + 1 msg = GetTickCount + 5000 End If End If Loop Else PlayerMsg index, "Invalid target.", BrightRed End If```I initialized all variables c,Tick and msg As Long.When i tried to see if i get the Action message every 5 secs for 4 times my server crash.It give me a don't sent error.Probably from an infinite loop or something.Can you please tell me whats wrong in this timer? :embarrassed: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now