MiscClientNot in this build

getChosenMpCharacterSlot

GET_CHOSEN_MP_CHARACTER_SLOT

The GTA V native GET_CHOSEN_MP_CHARACTER_SLOT of the MISC namespace, as LS:MP client scripts call it: the global function getChosenMpCharacterSlot, in JavaScript and in Lua.

SignatureJavaScript
getChosenMpCharacterSlot(): number
SignatureLua
getChosenMpCharacterSlot(): integer
⚠
Not in this game build

The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.

Usage

JavaScript
const result = getChosenMpCharacterSlot();
Lua
local result = getChosenMpCharacterSlot()

Parameters

None.

Returns

int JavaScript number, Lua integer

Reference

Namespace
Misc MISC
In the game
int GET_CHOSEN_MP_CHARACTER_SLOT()

Open in the interactive natives reference