Raised This Month: $ Target: $400
 0% 

Timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-15-2014 , 12:32   Re: Timer
Reply With Quote #1

use set_task() with the b flag

pseudo code:
PHP Code:
g_Counter 10
set_task
(1.0"count"1337__"b")

public 
count(id)
{
    
show_hudmessage(0"%i"g_Counter--)

    if(
g_Counter == 0)
        
remove_task(id)


Last edited by mottzi; 07-15-2014 at 12:33.
mottzi is offline
Send a message via MSN to mottzi
Alphad
Senior Member
Join Date: Jun 2014
Old 07-15-2014 , 12:40   Re: Timer
Reply With Quote #2

Quote:
Originally Posted by mottzi View Post
use set_task() with the b flag

pseudo code:
PHP Code:
g_Counter 10
set_task
(1.0"count"1337__"b")

public 
count(id)
{
    
show_hudmessage(0"%i"g_Counter--)

    if(
g_Counter == 0)
        
remove_task(id)

Thanks, and how can I stop a countdown if its in the middle?
Alphad 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 21:18.


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