-
Notifications
You must be signed in to change notification settings - Fork 5
/
client.lua
23 lines (21 loc) · 990 Bytes
/
client.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ShowNotificationTicker = function(message)
BeginTextCommandThefeedPost('STRING')
AddTextComponentSubstringPlayerName(message)
EndTextCommandThefeedPostTicker(0, 1)
end
RegisterCommand('coords', function()
local coords, heading = GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId())
SendNUIMessage({
type = 'clipboard',
data = '' .. vec(coords.x, coords.y, coords.z, heading)
})
ShowNotificationTicker('Copied to clipboard! ' .. vec(coords.x, coords.y, coords.z, heading))
end)
RegisterCommand('camcoords', function()
local coords, heading = GetFinalRenderedCamCoord(), GetFinalRenderedCamRot(0)
SendNUIMessage({
type = 'clipboard',
data = '{' .. vec(coords.x, coords.y, coords.z) .. ', ' .. vec(heading.x, heading.y, heading.z) .. ' }'
})
ShowNotificationTicker('Copied to clipboard! ' .. vec(coords.x, coords.y, coords.z) .. ', ' .. vec(heading.x, heading.y, heading.z) )
end)