How about you cut the switch to another function set_model(id). Then after checking if is user alive (is_user_connected is totally wrong) put set_task(random_float(0.5,2.0), set_model, id).
Also you should set model on new round event, not end round.