For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom Interaction

On this page, I'll give you snippets on how to add custom hack to Hacker V.

Config (shared/cfg.lua)

['ped'] = {
        ['personal_card'] = {
            ['icon'] = 'fa-solid fa-money-check-dollar',
            ['label'] = ' [E]', -- UI Label
            ['key'] = 38, -- Interact key code https://docs.fivem.net/docs/game-references/controls/
            ['event'] = 'rm_copsv:client:openPersonalCard',
            
        },
        ['dispatch'] = {
            ['icon'] = 'fa-solid fa-handcuffs',
            ['label'] = ' [Y]', -- UI Label
            ['key'] = 246, -- Interact key code https://docs.fivem.net/docs/game-references/controls/
            ['event'] = 'rm_copsv:client:fakeDispatch',
        },
        ['location_player'] = {
            ['icon'] = 'fa-solid fa-location-dot',
            ['label'] = ' [U]', -- UI Label
            ['key'] = 303, -- Interact key code https://docs.fivem.net/docs/game-references/controls/
            ['event'] = 'rm_copsv:client:locationPlayer',
        },
        -- Custom Interaction
        ['custom_interaction'] = {
            ['icon'] = 'fa-solid fa-location-dot',
            ['label'] = ' [U]', -- UI Label
            ['key'] = 47, -- Interact key code https://docs.fivem.net/docs/game-references/controls/
            ['event'] = 'rm_copsv:client:customEvent',
        },
},

Add these lines as a new option to ped interactions. This table should be placed under cfg['interactions']['ped'], similar to cfg['interactions']['vehicle'].

Last updated