new bool:taskDone set_task( time , "function" ) public function( ) { taskDone = true } public checkTaskDone( ) { if( taskDone ) { // ... } }