PlayerStartInteractionRequestPayload
What playerStartInteractionRequest gets: the payload a handler receives.
Renamed in 0.28 from InteractionRequestPayload; see renamed names.
Definition
Section titled “Definition”type PlayerStartInteractionRequestPayload = Omit<Interaction, "startedAtSessionMs" | "startedAt"> & Readonly<{ player: PlayerSnapshot; defaultMoneyCost: number; defaultHealthGain: number;}>;Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
id |
string |
The use’s ID, a decimal string. It becomes the Interaction’s ID when allowed. |
interactionKind |
"vending" | "food-cart" | "hotdog-truck" | "gym-bench" | "gym-bike" | "gym-dumbbells" | "gym-treadmill" | "script-object" |
What the player wants to use. |
objectId |
number |
Which one: the machine or cart’s number in the game, the hotdog van’s network ID, or your object’s ID. Unique together with interactionKind. |
player |
PlayerSnapshot |
The player, as they were when they asked. |
playerId |
number |
The player’s ID. |
model |
number |
The object’s GTA:SA model. |
interior |
number |
Its interior, 0 outside. |
position |
Vector3 |
Where it stands. |
scriptObject |
ScriptObject or absent |
Your object, for script-object. |
gymIntensity |
0 | 1 | 2 |
The gym machine’s intensity; 0 for everything else. |
defaultMoneyCost |
number |
What the game charges: $1 for vending and street food, $0 for the gym and your objects. |
defaultHealthGain |
number |
The health the game gives: +30 for vending (when the drink is finished), +50 for street food, 0 for the gym. |
Related
Section titled “Related”playerStartInteractionRequest: the decision