AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Execute command on set_task expire... (https://forums.alliedmods.net/showthread.php?t=25424)

organizedKaoS 03-13-2006 18:23

Execute command on set_task expire...
 
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.

twistedeuphoria 03-13-2006 18:48

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).

organizedKaoS 03-13-2006 19:16

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


All times are GMT -4. The time now is 20:27.

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