Skip to content

throwarray/clipboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

clipboard

Set clipboard text so you can paste it outside of FiveM. It works by waiting for a keypress event on the nui.

AddEventHandler('playerSpawned', function ()
    local playerPed = PlayerPedId()
    local coords = GetEntityCoords(playerPed)

    if not exports.clipboard:SettingClipboard() then
        exports.clipboard:SetClipboard(json.encode({
            x = coords.x,
            y = coords.y,
            z = coords.z,
            model = GetEntityModel(playerPed),
            heading = GetEntityHeading(playerPed)
        }), function (err)
            print('SET CLIPBOARD SUCCESS', not err)
        end) 
    end
end)

Releases

No releases published

Packages

No packages published