The clearPlayerController native AI script function is used to stop the control of an NPC by a player.
()clearPlayerController(botId: s) // clearPlayerController_s_
()clearPlayerController("(0x0002015bb4:01:88:88)");
This example code stops the control of the bot with the entity id "(0x0002015bb4:01:88:88)" by the player.