Skip to content

interactions.stop

Ends a use now, as if the player stopped. interactionEnded follows with reason "script".

interactions.stop(id: string): Promise<ActionResult>
Name Type Description
id string The use’s ID, from interactions.listAll or an event.

A promise of an ActionResult: applied, or rejected with invalid-interaction-id or interaction-not-found.

Everyone off the machines.

gamemodes/my-mode.ts
import { commands, interactions } from "nativemp";
commands.register("closegym", async () => {
for (const use of interactions.listAll()) await interactions.stop(use.id);
});