Raised This Month: $ Target: $400
 0% 

repeating task?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chex
Junior Member
Join Date: Jun 2006
Old 06-05-2006 , 21:29   repeating task?
Reply With Quote #1

Code:
if(get_user_health(targetid) <= 1)     {         user_silentkill(targetid)         make_deathmsg (id,targetid,0,"Loss of Life")     }     else set_user_health(targetid,get_user_health(targetid)-1)

What would I do to repeat that ever 20 secs? I know to start it would be
Code:
set_task(20.0,???...)
But what would I put in ??? to make it run that function and only that function forever?
Chex is offline
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 06-05-2006 , 21:42  
Reply With Quote #2

Why not put that in Client_PreThink?
wonsae is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 06-05-2006 , 21:46  
Reply With Quote #3

Code:
set_task(20.0 , "YourFunc" , PlayerID , _ , _ , "b")
Code:
public YourFunc(id) {     if(get_user_health(id) <= 1)     {         user_silentkill(id)         make_deathmsg (id,id,0,"Loss of Life")     }     else set_user_health(id,get_user_health(id)-1) }
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Chex
Junior Member
Join Date: Jun 2006
Old 06-05-2006 , 23:06  
Reply With Quote #4

Thank you.
Chex 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 16:33.


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