#Export for opening racing tablet

1 messages · Page 1 of 1 (latest)

topaz bison
#

Is there any export that opens racing tablet?

obtuse vigil
#

Try search for "exports" in the client files

topaz bison
#

Thank you

#

Found it

topaz bison
#

I tryed to add cw racing app to fd laptop

#

   local isServer = IsDuplicityVersion()
  local appId = 'cw-racing'

  if isServer then
      CreateThread(function()
          while GetResourceState("fd_laptop") ~= "started" do
              Wait(500)
          end

          local added, errorMessage = exports.fd_laptop:addCustomApp({
              id = appId,
              name = "Racing",
              isDefaultApp = true,
              needsUpdate = false,
              icon = 'racing.svg',
              ui = ("https://cfx-nui-%s/resource/tablet/nui/index.html"):format(GetCurrentResourceName()),
              keepAlive = true,
              --deviceId = 'dongle',
              windowActions = {
                  isResizable = false,
                  isMaximizable = false,
                  isClosable = true,
                  isMinimizable = true,
                  isDraggable = false
              },
              windowDefaultStates = {
                  isMaximized = true,
                  isMinimized = false
              },
              onUseServer = function(source)
                  SetTimeout(500, function()
                      TTriggerClientEvent("cw-racingapp:client:openUi", source)
                  end)
              end,
          })

          if not added then
              print("Could not add app:", errorMessage)
          end
      end)
  end
#

in this way