Quasar Store Logo

Commands and Exports

This section lists all available commands, exports, and events included in the script. You’ll find client-side, server-side, and shared functions designed to help developers integrate, extend, or interact with the system easily within their own scripts or frameworks.

Commands

This section lists all available commands included in the script. Each command is designed to simplify administration, player interaction, or debugging tasks. You’ll find detailed descriptions, usage examples, and permission requirements to help you manage and customize your server efficiently.

CommandDescription
/police [message]Sends a dispatch call to the police (similar to /enterno)
/ambulance [message]Same thing but for medics.
/mechanic [message]Same thing but for mechanics.
/panic [message]Panic call sent by a police officer to all other police officers.


Client Exports

This section provides all available client exports for the script. These functions allow you to interact directly with the system from the client side, enabling custom features, UI interactions, and integrations with other resources. Each export includes a short description and usage example for easy implementation.

GetPlayerInfo

getSSURL

ToggleDuty

Default Exports

-- Example usage of a predefined dispatch event exports['qs-dispatch']:Shooting() -- Other available dispatch exports exports['qs-dispatch']:VehicleShooting() exports['qs-dispatch']:OfficerDown() -- Robbery related exports['qs-dispatch']:StoreRobbery() exports['qs-dispatch']:FleecaBankRobbery() exports['qs-dispatch']:PaletoBankRobbery() exports['qs-dispatch']:PacificBankRobbery() exports['qs-dispatch']:VangelicoRobbery() exports['qs-dispatch']:HouseRobbery() exports['qs-dispatch']:ArtGalleryRobbery() exports['qs-dispatch']:HumaneRobbery() exports['qs-dispatch']:TrainRobbery() exports['qs-dispatch']:VanRobbery() exports['qs-dispatch']:UndergroundRobbery() exports['qs-dispatch']:DrugBoatRobbery() exports['qs-dispatch']:UnionRobbery() exports['qs-dispatch']:YachtHeist() -- Crime and suspicious activity exports['qs-dispatch']:DrugSale() exports['qs-dispatch']:SuspiciousActivity() exports['qs-dispatch']:CarJacking() exports['qs-dispatch']:VehicleTheft() exports['qs-dispatch']:CarBoosting() exports['qs-dispatch']:IllegalRacing() exports['qs-dispatch']:Kidnapping() -- Misc events exports['qs-dispatch']:PrisonBreak() exports['qs-dispatch']:IllegalFishing() exports['qs-dispatch']:ArmsDeal() exports['qs-dispatch']:CyberAttack()

Quasar Dispatch includes multiple predefined exports that allow scripts to trigger dispatch alerts for different situations automatically. By calling one of these exports, the system creates a dispatch event that notifies the configured jobs, typically police or emergency services. These events cover many common roleplay scenarios such as shootings, vehicle crimes, robberies, suspicious activity, prison escapes, and other illegal actions. Each export represents a specific type of alert, allowing servers to integrate dispatch notifications easily into their scripts without needing to manually build the entire dispatch data structure.





Server Exports

This section provides all available server exports for the script. These functions allow developers to interact with the system from the server side, manage data, trigger actions, and integrate with other resources. Each export includes a clear description and a practical example to simplify its implementation.

GetPlayerInfo

exports['qs-dispatch']:GetPlayerInfo(playerID, function(playerData) if playerData then print("Player coordinates: " .. tostring(playerData.coords)) print("Nearby street: " .. playerData.street_1) print("Player vehicle: " .. (playerData.vehicle_label or "None")) else print("Failed to retrieve player info.") end end) -- Example returned data { ped = 123, coords = vector3(200.12, -150.34, 50.08), street_1 = "Great Ocean Hwy", street_2 = "Joshua Rd", sex = "Male", vehicle = "vehicle_01", vehicle_label = "Sultan RS", vehicle_colour = "Red", vehicle_plate = "AB123CD", speed = 120 }

The GetPlayerInfo export retrieves detailed information about a specific player using their player ID. The function works asynchronously and returns the player data through a callback, providing access to useful contextual information such as the player’s coordinates, nearby streets, gender, and vehicle information if the player is inside a vehicle. This export is especially useful for server-side systems that need to access real-time player data, such as dispatch alerts, logging systems, crime reports, or other gameplay mechanics that depend on a player’s current location and status.

GetSSURL

exports['qs-dispatch']:GetSSURL(playerID, function(image) if image then print("Screenshot URL: " .. image) else print("Failed to retrieve screenshot.") end end)

The GetSSURL export allows you to capture a screenshot of a specific player by providing their player ID. The function works asynchronously and returns the result through a callback, giving a URL string that points to the captured screenshot. This image link can be used in systems such as dispatch alerts, evidence systems, logs, or moderation tools where visual confirmation of player activity is useful. If the screenshot cannot be captured or uploaded, the returned value will be nil, allowing the script to handle cases where the image is unavailable.