Quote:
Originally Posted by Bugsy
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.
|
Exactly. Just some minor things: (see comments)
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
menu_destroy(id); // after randomizing an option, close the menu
}