Restrictions to Opening Menu

Setting Up Any Restrictions to Opening The Menu

By default, anybody in the vehicle can open the menu (with passengers having limited access compared to the driver). By default, when a passenger is in handcuffs, they will not be allowed to open the menu. To account for any restrictions similar to these, you can edit the openCCAfterCheck(veh)function in[shared/functions.lua] . If you require access to server side functions for more advanced options, open a ticket in our discord server, and we can help

shared/functions.lua
-- If you want to add any restrictions/conditions for opening the vehicle menu, you can add them here
-- By defualt, the player cannot open the menu if in handcuffs. Check documentation if you need this code, in case you lost it
function openCCAfterCheck()
    TriggerServerEvent('getHandcuffStatus')

    if not pedIsCuffed then
        openCC() -- This will actually open the menu, so add your conditions before this
    end

end

Last updated