Commands#
Restaurant Creator has one everyday command. Everything else is opened at its point in the world.
Command | Who | Description |
|---|---|---|
| Admins and | Opens the creator: build, edit, delete and teleport to restaurants, and manage the allowed items. |
|
Documentation
Restaurant Creator commands and server exports: open the creator with /restcreator, and hire, fire, promote and read restaurant workers from your own FiveM scripts.
Restaurant Creator has one everyday command. Everything else is opened at its point in the world.
Command | Who | Description |
|---|---|---|
| Admins and | Opens the creator: build, edit, delete and teleport to restaurants, and manage the allowed items. |
|
Ace command.giveburgeritems
Testing only. Gives every burger ingredient (10 by default). Exists only with |
| Ace | Testing only. Gives the dough, sauce, cheese and every topping. Exists only with |
To give your staff the test commands, grant the aces in server.cfg:
add_ace group.admin command.giveburgeritems allow
add_ace group.admin command.givepizzaitems allowHow another resource works with Restaurant Creator's staff: a job-interview script that hires, a door that only opens for workers, a radio channel per restaurant. All exports are server-side.
Argument | Accepts |
|---|---|
| The server id of an online player. |
| The restaurant's id, or its label (case-insensitive). |
| A rank label (case-insensitive), or a number — tried as the rank id first, then as the grade. Use the label when ids and grades could collide. |
Exports that change something return true, or false, errorCode. The boss menu of everyone affected updates instantly.
Without a restaurant, returns a list of every job the player holds ({} if none). With one, returns that job or nil. This is also the way to check for the owner.
local emp = exports['qs-restaurant-creator']:GetPlayerEmployment(source, 'Burger Shot')
if not emp then return end -- not employed there
if emp.isOwner then
-- the owner
elseif emp.rank and emp.rank.grade >= 2 then
-- a senior rank
end
-- every restaurant the player works at
for _, job in ipairs(exports['qs-restaurant-creator']:GetPlayerEmployment(source)) do
print(job.restaurantLabel, job.rank and job.rank.label)
endField | Meaning |
|---|---|
| Which restaurant. |
|
|
| The worker record. |
| , or for the owner and workers with no rank. |
Permission keys: canAccessBossMenu, canAccessWorkers, canAccessFinance, canAccessSettings, canAccessRecipes, canAccessShop, canDeposit, canWithdraw, canHireWorkers, canFireWorkers, canEditRanks.
local ok, err = exports['qs-restaurant-creator']:HireWorker('Burger Shot', targetId, 'Cook')
-- no rank: the restaurant's lowest grade
local ok, err = exports['qs-restaurant-creator']:HireWorker(1, targetId)Errors: restaurant_not_found, invalid_player, already_worker, rank_not_found, failed.
local ok, err = exports['qs-restaurant-creator']:FireWorker(targetId, 'Burger Shot')
-- no restaurant: removed from every restaurant they do not own
local ok, err = exports['qs-restaurant-creator']:FireWorker(targetId)Owners are never removed. Errors: invalid_player, restaurant_not_found, not_worker, is_owner, failed.
local ok, err = exports['qs-restaurant-creator']:SetWorkerRank('Burger Shot', targetId, 'Manager')Errors: restaurant_not_found, invalid_player, not_worker, rank_not_found, failed.
for _, r in ipairs(exports['qs-restaurant-creator']:GetRestaurants()) do
print(r.id, r.label, r.isOpen, r.owner and r.owner.name)
end
local r = exports['qs-restaurant-creator']:GetRestaurant('Burger Shot') -- or an id; nil if not foundEach summary holds id, label, color, isOpen, image and, when set, owner = { identifier, name }.
RegisterNetEvent('myresource:openStaffDoor', function(restaurantId)
local src = source
if not exports['qs-restaurant-creator']:GetPlayerEmployment(src, restaurantId) then
return -- not a worker there
end
-- open the door
end)exports['qs-restaurant-creator']:consumable is the hook ox_inventory calls when a dish is used. You never call it yourself — it is referenced from the item definition as server = { export = 'qs-restaurant-creator.consumable' } (see Inventory Items). Other inventories register the dishes as usable items automatically.
{ id, label, grade, permissions }nil