Quote:
Originally Posted by liryck
um well srry by the threat but i have another question and well the other is tutorials forums.
so lets see i have a task in the function AwesomeMenu right so when i call AwesomeMenu the task start too right?
the task is like seta told me set_task(10.0,"random_choose",menu_id)
so i want to remove that task if the player who got the menu choose an option, the right way should be remove_task(menu_id). if im right at this moment all good.
now my question is when i call again AwesomeMenu the task start again? if not how i make to started again
|
menu_id would be the task-id. Think of it as an identification number for that particular task. If this is the only usage for tasks in your plugin then you can always use the player-id as the task-id. Otherwise you will need a little extra, let me know if this is the case.
This might help:
PHP Code:
AwesomeMenu( id )
{
showmenu( id );
set_task( 10.0 , "random" , id );
}
MenuChooser( id )
{
//player (id) chose something on menu
remove_task( id );
}
public random( id )
{
//callfunc( id );
//get_user_health( id );
//or w\e
}
__________________