GE Lua Documentation

Press F to search!

getPlayerUnicycle

Definition


-- @/lua/ge/extensions/gameplay/walk.lua:22

local function getPlayerUnicycle(veh)
  veh = veh or getPlayerVehicle(0)
  if veh and veh:getJBeamFilename() == "unicycle" then
    return veh
  end
end

Callers

@/lua/ge/extensions/gameplay/walk.lua
local function isWalking()
  return getPlayerUnicycle() ~= nil
end
local function getUnicyleAtPosition(pos, visibilityPoint)
  local unicycle = getPlayerUnicycle()
local function getInVehicle(vehicle)
  local unicycle = getPlayerUnicycle()
  be:enterVehicle(0, vehicle)
  if not active then return end
  local unicycle = getPlayerUnicycle()
  local camData = core_camera.getCameraDataById(unicycle:getId())
  if (enabled == active) or ((not atParkingSpeed or not togglingEnabled or (core_replay.getState() == 'playback')) and not force) then
    return false, getPlayerUnicycle() and getPlayerUnicycle():getId()
  end
  if (enabled == active) or ((not atParkingSpeed or not togglingEnabled or (core_replay.getState() == 'playback')) and not force) then
    return false, getPlayerUnicycle() and getPlayerUnicycle():getId()
  end
  if enabled then
    if not getPlayerUnicycle() then
      extensions.hook("onBeforeWalkingModeToggled", enabled)
      extensions.hook("onBeforeWalkingModeToggled", enabled)
      setUnicycleInactive(getPlayerUnicycle())
    end
  end
  local playerUnicycle = getPlayerUnicycle()
  if enabled then
  if active then
    local unicycle = getPlayerUnicycle()
    vehPos:set(unicycle:getPositionXYZ())
  vehicleBlacklist = data.vehicleBlacklist
  active = getPlayerUnicycle() ~= nil
end
local function getPosRot()
  local unicycle = getPlayerUnicycle()
  if active and unicycle then
local function getPosXYZ()
  local unicycle = getPlayerUnicycle()
  if active and unicycle then
local function getRotXYZW()
  local unicycle = getPlayerUnicycle()
  if active and unicycle then

  active = getPlayerUnicycle() ~= nil
end
@/lua/ge/extensions/career/modules/tether.lua
local function checkBoxTether(t)
  -- we can assume getPlayerUnicycle() is not nil, because it is checked in isWalking()
  if not getPlayerVehicle(0) then return end
local function checkSphereTether(t)
  -- we can assume getPlayerUnicycle() is not nil, because it is checked in isWalking()
  if not getPlayerVehicle(0) then return end
local function checkCapsuleTether(t)
  -- we can assume getPlayerUnicycle() is not nil, because it is checked in isWalking()
  if not getPlayerVehicle(0) then return end
local function checkVehicleTether(t)
  -- we can assume getPlayerUnicycle() is not nil, because it is checked in isWalking()
  if not getPlayerVehicle(0) then return end