This is a small script to allow google docs document to be viewed and edited ingame.
You have to keep in mind the following:
Your document must be public with the collaborator function! (the link will not be displayed so all save)
you must exchange in the index.html my link to yours!
To open the menu you must press the N key!
Hi ! great release man,
I think it would be nice to have a menu in which you can choose which document to open, among those listed in the html file.
Donāt know if this is hard to do but it would be great to see that !
Hello, thanks man!
the script is built so that it can open only one thing. But you can simply copy the script and html replace the link and in the main.lua change your job āpoliceā to āambulanceā for example
RegisterCommand(āpcadā, function(source, args, rawCommand)
if showUi == false then
if ESX.PlayerData.job.name ~= nil and ESX.PlayerData.job.name == āpoliceā then
SetNuiFocus(true, true)
SendNUIMessage({type = āenableā})
showUi = true;
end
end
end)
RegisterNUICallback(āNUIFocusOffā, function()
if showUi == true then
SetNuiFocus(false, false)
SendNUIMessage({type = ādisableā})
showUi = false
end
end)
Replace This with
Citizen.CreateThread(function()
Citizen.Wait(1)
while true do
if IsControlJustReleased(0, 306) then --N
if showUi == false then
if ESX.PlayerData.job.name ~= nil and ESX.PlayerData.job.name == āpoliceā then
SetNuiFocus(true, true)
SendNUIMessage({type = āenableā})
showUi = true;
end
end
end
Citizen.Wait(1)
end
end)
RegisterNUICallback(āNUIFocusOffā, function()
if showUi == true then
SetNuiFocus(false, false)
SendNUIMessage({type = ādisableā})
showUi = false
end
end)