Native referenceFiveM

GET_PLAYER_SWITCH_STATE

0x470555300D10B2A5 STREAMING
FUNCTION SIGNATURE
int GET_PLAYER_SWITCH_STATE(/* parameters not documented */);
Property Value
Native Name GET_PLAYER_SWITCH_STATE
Hash 0x470555300D10B2A5
Return Type int

Examples

local stateSwitch = GetPlayerSwitchState()
if stateSwitch == 5 then
    -- Player is in the air
    elseif stateSwitch == 12 then
    -- Player is not in the air or switch is completed
end
const stateSwitch = GetPlayerSwitchState();
if (stateSwitch == 5) {
    // Player is in the air
} else if (stateSwitch == 12) {
    // Player is not in the air or switch is completed
}
using static CitizenFX.Core.Native.API;

int stateSwitch = GetPlayerSwitchState();
if (stateSwitch == 5) {
    // Player is in the air
} else if (stateSwitch == 12) {
    // Player is not in the air or switch is completed
}
Back to STREAMING