Raised This Month: $ Target: $400
 0% 

Execute command on set_task expire...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 03-13-2006 , 18:23   Execute command on set_task expire...
Reply With Quote #1

Im writing a plugin to show a menu to players when they first get into the server. I have the menu show up with set_task for a certain amount of time. How can I have a command executed when the task timer has expired. The players are given three choices, but if they dont choose any before the time expires, I want another command to execute after the task timer has finished. I have all the scripts done, inlcuding the menu key actions, I just need to know how to find out when the task has expired. Thanks for any help.
organizedKaoS is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 03-13-2006 , 18:48  
Reply With Quote #2

The purpose of the task is to call a function when the timer expires ie set_task(time,"function"). If you want your menu to do something but not do the function that is supposed to be called at the end, give the set_task a task id and use remove_task (go look in the funcwiki if you don't understand).
__________________
twistedeuphoria is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 03-13-2006 , 19:16  
Reply With Quote #3

I went another route, I just assigned a global variable. If a person pressed a menu key, the variable is changed, if not the alternate is executed. Thanks for the help
organizedKaoS 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 20:27.


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