Client
Client Exports
--- Retrieves the player's current data, including gender, weapon, coordinates, and vehicle details.
--- @return table - A table containing the following keys:
--- - sex (string): The gender of the player.
--- - gun (string): The name of the weapon the player is holding (if any).
--- - ped (integer): The player's ped ID.
--- - coords (table): A vec2 table with the player's rounded x and y coordinates.
--- - name (string): The player's name.
--- - GetVehicleIn (integer): The vehicle ID the player is currently in, or 0 if not in a vehicle.
--- - isInVehicle (boolean): Whether the player is in any vehicle.
--- - source (integer): The player's server ID.
exports['l2s-dispatch']:GetPlayerData()
--- Retrieves various data for the specified vehicle.
--- This function fetches the vehicle's name, plate, class, color, and network ID.
--- @param vehicle integer - The vehicle entity ID to retrieve data for.
--- @return table - A table containing the following keys:
--- - name (string): The vehicle's name.
--- - plate (string): The vehicle's plate number.
--- - class (string): The vehicle's class (e.g., Sedan, SUV, etc.).
--- - color (string): The vehicle's color.
--- - id (integer): The vehicle's network ID.
exports['l2s-dispatch']:GetVehicleData(vehicle)
--- Finds the nearest security camera to the given coordinates within a specified range.
--- @param x number - The x-coordinate of the position to check.
--- @param y number - The y-coordinate of the position to check.
--- @param range number - The maximum range to search for a nearby camera.
--- @return string|boolean - The key of the nearest camera if found, or false if no camera is within range.
exports['l2s-dispatch']:GetNearestCamera(x, y, range)
--- Toggles the visibility of the large UI dashboard.
--- Closes the dashboard if it is currently open, and opens it if it is closed.
--- @return None
exports['l2s-dispatch']:ToggleDashboard()
---- Toggles the visibility of the Small UI Unit list.
--- Closes the dashboard if it is currently open, and opens it if it is closed.
--- @return None
exports['l2s-dispatch']:ToggleList()
--- Displays a list of units or Small UI.
--- @param toggle boolean - If true, forces the list to show; if false, hides the list.
--- @return None
exports['l2s-dispatch']:ShowList()
--- Checks if the player has access based on their job.
--- Returns the hub or department name if the player has access, otherwise returns false.
--- @param job string - The job of the player to check access for.
--- @return string|boolean - Returns the hub or department name if the player has access, or false if they don't.
exports['l2s-dispatch']:CheckAccess(job)
--- Toggles the dispatch mode based on the provided boolean value.
--- If true, enables dispatch mode; if false, disables it.
--- @param bool boolean - The state of the dispatch mode: true to enable, false to disable.
--- @return None
exports['l2s-dispatch']:ToggleDispatchMode(bool)
--- Forces the player to quit the body cam view.
--- @return None
exports['l2s-dispatch']:ForceQuitBodyCam()
--- Forces Close CCTV Camera.
--- @return None
exports['l2s-dispatch']:CloseCCTVCamera()
Last updated