gymExerciseModeChanged
Tells your gamemode that a player on a gym machine changed its intensity. Everyone sees them exercise at the new intensity. You cannot refuse the change.
Signature
Section titled “Signature”server.on("gymExerciseModeChanged", ({ interaction, player, gymIntensity }) => void)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
interaction |
Interaction |
The gym use. |
player |
PlayerSnapshot |
The player. |
gymIntensity |
0 | 1 | 2 |
Low, medium or high. |
Example
Section titled “Example”import { server } from "nativemp";
server.on("gymExerciseModeChanged", ({ player, gymIntensity }) => { if (gymIntensity === 2) server.log(`${player.name} goes all out`);});Related
Section titled “Related”gymExerciseCompleted: a session finishedplayerStartInteractionRequest: decide whether a player may use a gym machine