Skip to main content

Server Exports

All exports require a valid store location key from Config.Stores (e.g. "Strawberry", "Davis", "VespucciCanals").

Reset

Resets the robbery at the given location, clearing active state and restoring the store.
exports['projectx-storerobbery-gabz']:Reset('Strawberry')
Returns
  • true if the location exists and was reset successfully

IsRobberyInProgress

Returns whether a robbery is currently active at the given location.
local active = exports['projectx-storerobbery-gabz']:IsRobberyInProgress('Strawberry')
Returns
  • true if a robbery is in progress at that location, false otherwise
Example
local active = exports['projectx-storerobbery-gabz']:IsRobberyInProgress('Davis')
if active then
    print("Davis gas station is being robbed")
end

GetActiveRobberyCount

Returns the total number of active store robberies across all locations.
local count = exports['projectx-storerobbery-gabz']:GetActiveRobberyCount()
Returns
  • count (number) — total active robberies
Example
local count = exports['projectx-storerobbery-gabz']:GetActiveRobberyCount()
print("Active store robberies: " .. count)