Raised This Month: $51 Target: $400
 12% 

About Timer function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
urus
Senior Member
Join Date: Jan 2007
Old 12-11-2007 , 19:48   About Timer function
Reply With Quote #1

new Handle:g_Timer = INVALID_HANDLE;


1. I must to KillTimer (g_Timer); on OnMapEnd() if timer created by g_Timer = CreateTimer(1.0, testtimer, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE); and still work when map changing?


2. KillTimer (g_Timer); and CloseHandle(g_Timer); it same things and not necessary to use both of them? For example:

KillTimer (g_Timer);
CloseHandle(g_Timer);
urus is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 12-11-2007 , 21:29   Re: About Timer function
Reply With Quote #2

1. No, you should not have to use KillTimer() with OnMapEnd() if you specify TIMER_FLAG_NO_MAPCHANGE

2. Just use KillTimer(). You should do it like this though:

KillTimer(g_Timer);
g_Timer = INVALID_HANDLE;
__________________
I'm a blast from the past!
ferret is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode