RoyaleWindRoyaleWind
RW FashionExports

Client

Client-side exports for opening and closing the store.

openStore

Opens a store for the local player, as if they had used the clerk.

exports.rw_fashion:openStore(storeId)
  • storeId: string — a store id from the editor's Stores tab.

Returns: boolean — false if the store id doesn't exist. true means opening has started, not that it succeeded — the player still has to be on foot, and the server still runs its own checks (job lock, distance from the counter and the canOpenStore hook) and can refuse.

exports.rw_fashion:openStore('ponsonbys_rockford')

closeStore

Closes the store if it's open, running the exit curtain and putting the player's clothes, camera and position back.

exports.rw_fashion:closeStore()

isOpen

exports.rw_fashion:isOpen()

Returns: boolean — whether the store is open for the local player.

if exports.rw_fashion:isOpen() then
    return -- don't open the phone while shopping
end

On this page