Skip to content

Configuration

Configuration

모든 설정은 config.lua에서 이루어집니다. 이 페이지에서는 모든 옵션을 차례대로 설명합니다.

General

config.lua
Config.Framework = 'qbox'    -- qbox / qbcore / esx / standalone
Config.Command   = 'animpos' -- chat command name
Config.Cooldown  = 15        -- cooldown between uses (seconds)
  • Framework — 코어 리소스 및 적용할 메타데이터 제한을 선택합니다.
  • Command — 도구를 여는 채팅 명령어입니다 (키매핑 이름으로도 사용됨).
  • Cooldown — 사용 간의 최소 대기 시간(초)입니다.

Keybind

플레이어가 키를 눌러 도구를 열 수 있게 합니다. GTA V 설정에서 재할당이 가능합니다.

config.lua
Config.Keybind = {
    Enabled = true,
    Default = 'F6',  -- default key (empty for none; player can rebind)
}

키매핑은 Enabled = true 이고 동시에 Default가 비어 있지 않은 경우에만 등록됩니다. 플레이어는 설정 → 키 바인딩 → FiveM에서 언제든지 다시 바인딩할 수 있습니다.

Permission (optional)

도구를 사용할 수 있는 권한을 제한합니다. 기본적으로 꺼져 있습니다.

config.lua
Config.Permission = {
    Enabled = false,
    Type    = 'ace',                     -- 'ace' / 'job'
    Ace     = 'animpos.use',             -- used when Type == 'ace'
    Jobs    = { 'police', 'ambulance' }, -- used when Type == 'job'
}
  • ace — ox_lib 콜백을 통해 IsPlayerAceAllowed로 서버 측에서 확인됩니다(가장 안전함). add_ace ... animpos.use allow로 권한을 부여하세요.
  • job — 플레이어의 프레임워크 직업 이름이 Jobs 목록에 있어야 합니다 (QBox / QB-Core / ESX).

Restrictions

플레이어가 특정 상태에 있을 때 사용을 차단합니다. 네이티브 체크는 모든 프레임워크에서 작동하며, 메타데이터 체크는 QBox 및 QB-Core에만 적용됩니다.

config.lua
Config.Restrictions = {
    -- Framework based (qbox / qbcore only)
    CheckDead        = true,   -- block while dead
    CheckLastStand   = true,   -- block while in last stand
    CheckHandcuffed  = true,   -- block while handcuffed

    -- Native based (works on ALL frameworks incl. standalone)
    CheckInVehicle   = true,   -- block while inside a vehicle
    CheckFalling     = true,   -- block while falling / parachuting
    CheckSwimming    = false,  -- block while swimming

    -- Metadata field names read from the player data
    MetaKeys = {
        Dead       = 'isdead',
        LastStand  = 'inlaststand',
        Handcuffed = 'ishandcuffed',
    },
}

MetaKeys는 프레임워크의 플레이어 데이터에 있는 메타데이터 필드 이름과 매핑됩니다. 만약 코어(또는 커스텀 패키지)가 다른 키로 이를 저장한다면, 사망 / 라스트 스탠드 / 수갑 착용 체크가 올바른 값을 읽을 수 있도록 여기서 변경해 주세요.

Notifications

모든 메시지에 사용될 백엔드를 선택합니다.

config.lua
Config.Notify = 'ox_lib'  -- 'ox_lib' / 'qbcore' / 'esx' / 'custom'

-- Only used when Config.Notify == 'custom'.
-- ntype is one of: 'success' / 'error' / 'primary' / 'inform'
Config.CustomNotify = function(message, ntype)
    -- exports['my-notify']:SendAlert(message, ntype)
end
  • ox_liblib.notify (기본값).
  • qbcoreQBCore:Notify 이벤트.
  • esxesx:showNotification 이벤트.
  • customConfig.CustomNotify 내의 사용자 지정 핸들러.

잘못된 Config.Notify 값이 입력되면 서버 콘솔에 경고가 기록되며 안전하게 ox_lib로 대체됩니다.

UI

config.lua
Config.UI = {
    Position = 'right',       -- left / right / center
    OffsetX  = 30,            -- distance from the edge (px)
    OffsetY  = 0,             -- vertical offset (px)
    AccentColor = '#f4cb98',  -- accent colour for key highlights / glow
    ShowHeader = true,        -- show the title/subtitle header
    ShowTip    = true,        -- show the bottom tip line
    ShowAnimations = true,    -- key press animations
    AnimationType = {
        Movement = 'pulse',   -- pulse / glow
        Action   = 'glow',    -- pulse / glow
    }
}

Movement

config.lua
Config.Movement = {
    Speed         = 0.01,  -- movement speed
    RotationSpeed = 0.5,   -- rotation speed
    MaxDistance   = 5.0,   -- max distance from start (m)
    MaxHeight     = 3.5,   -- max height above start (m)
    MinHeight     = -3.5,  -- min height below start (m)
    PrecisionMultiplier = 0.25, -- speed multiplier while holding Precision
}

Performance

config.lua
Config.Performance = {
    NetworkUpdateDelay = 50,   -- network sync delay (ms)
    LoopWait           = 0,    -- main loop wait (ms)
    AnimationDuration  = 300,  -- UI animation duration (ms)
    SyncCooldown       = 50,   -- server-side anti-spam sync cooldown (ms)
}

AnimationDuration은 패널의 전환 길이로 UI에 전달됩니다. 동기화 관련 값들은 위치 업데이트가 전송되고 수락되는 빈도를 조절합니다.

Sounds

열기 / 확인 / 취소 / 초기화 시 재생되는 선택적인 GTA V 프론트엔드 사운드입니다.

config.lua
Config.Sounds = {
    Enabled = true,
    Open    = { name = 'SELECT',        set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
    Confirm = { name = 'SELECT',        set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
    Cancel  = { name = 'CANCEL',        set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
    Reset   = { name = 'RESET_PROMPTS', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
}

모든 사운드를 음소거하려면 Enabled = false로 설정하세요.

CanUse hook

플레이어가 도구를 열려고 시도할 때마다 실행되는 커스텀 체크입니다. 허용하려면 true를 반환하고, 차단하려면 false를 반환하세요(선택적으로 메시지 문자열을 함께 반환 가능).

config.lua
Config.CanUse = function()
    -- Example: block while taking damage
    -- local ped = PlayerPedId()
    -- if HasEntityBeenDamagedByAnyPed(ped) then
    --     return false, 'You cannot do this while taking damage!'
    -- end
    return true
end

Controls

컨트롤 키 스캔코드 역시 Config.Controls에서 완전히 설정할 수 있습니다 (앞으로, 뒤로, 위로, 아래로, 왼쪽, 오른쪽, 회전, 확인, 취소 + 2개의 대체 키, 초기화 및 정밀 조작). 기본 레이아웃은 Usage & Controls 페이지를 참고하세요.