Close laptop UI

📴 closeLaptopUI

Description

Closes the Kartik Laptop UI for the player. This function removes focus from NUI and hides any open laptop or VIN scratch interfaces.

Usage

exports['kartik-laptop']:closeLaptopUI()

Behavior

  • Checks if the laptop UI is currently open.

  • Removes NUI focus from the player.

  • Sends NUI messages to close both:

    • The main laptop interface.

    • The VIN scratch UI (if active).

Returns

Type
Description

nil

This export does not return a value.

Example

RegisterCommand("close_laptop", function()
    exports['kartik-laptop']:closeLaptopUI()
end)

Notes

  • Best used when the player exits laptop mode or moves away from the interaction zone.

  • Automatically ensures all related UI components are properly closed.

Last updated