Cadburry ScriptsCadburry Scripts

Commands

Quality of life scripts for your FiveM server. Performance optimized resources that install in minutes, with free updates and support that actually answers.

bridge/client/commands.lua

lua
if not Config.EnableCommands then return end

--- Carry Nearby Person
--- Default Keybind: NONE
--- RegisterKeyMapping('carry', 'Carry Nearby Person', 'KEYBOARD', '')
RegisterCommand('carry', function()
    exports['cad-carry']:CarryPerson()
end, false)

--- Remove Person InTrunk
--- Default Keybind: NONE
--- RegisterKeyMapping('removetrunk', 'Remove Trunk Person', 'KEYBOARD', '')
RegisterCommand('removetrunk', function()
    exports['cad-carry']:RemoveTrunk()
end, false)

--- Remove Person InSeat
--- Default Keybind: NONE
--- RegisterKeyMapping('removeseat', 'Remove Seat Person', 'KEYBOARD', '')
RegisterCommand('removeseat', function()
    exports['cad-carry']:RemoveSeat()
end, false)

--- Default Keybind: X
--- Cancel Carry (can be done by both carrying person and carried person)
RegisterKeyMapping('cancelcarry', 'Cancel Carry', 'KEYBOARD', 'X')
RegisterCommand('cancelcarry', function()
    exports['cad-carry']:CancelCarry()
end, false)

--- Chat Suggestions
CreateThread(function()
    Wait(2000)
    TriggerEvent('chat:removeSuggestion', '/cancelcarry')
    TriggerEvent('chat:addSuggestion', '/carry', 'Carry nearby person')
    TriggerEvent('chat:addSuggestion', '/removetrunk', 'Remove person from vehicle trunk')
    TriggerEvent('chat:addSuggestion', '/removeseat', 'Remove person from nearest vehicle seat')
    TriggerEvent('chat:addSuggestion', '/cancelcarry', 'Cancel carry')
end)
Last updated Cadburry Scripts