Just a simple import for setting clipboard text.
It works by waiting for a keypress event on the nui. Do whatever with it. lul
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)
– /uploads/default/original/3X/8/e/8e40ed9503f47702dd162d46966c43c51564deb3.zip
Edit: Download moved to github