Studios
Hide & Seekhouse-3.jpg

Examples

SoonHide & SeekQBCore · Qbox · ESX
PAGE 04 OF 06  ·  CONFIGURATION → EXAMPLES → TROUBLESHOOTINGdocs.glitchstudios.dev
Browse docs
  • The first player to join is the host. If the host leaves, the next player in line takes over.
  • Votes decide the map. Ties are random, and the host can force a map.
  • A match can have several rounds on the same map. Seekers rotate between rounds and the last screen shows overall standings.
  • A seeker finds a hider by punching them or with the Tag option from ox_target. The server checks distance and cooldown, and nobody takes damage.
  • Inventory and weapons are locked during a match and hiders cannot attack. A player who leaves the play area is warned and then put back.
  • Found hiders can spectate the rest of the round. Hiders still in the round can watch others too.
  • If the last seeker leaves, a random hider takes over.
  • The server rate limits every lobby callback to one call per player every 500 ms (250 ms for the lobby refresh).
  • Matches run in routing buckets starting at Config.Bucket.base (7300). Pick a different base if another resource uses that range.
  • The lobby position is kept as the character's saved position during a match, so a crash or disconnect never logs someone back in inside an interior.

Play areas#

Each map has a circle in config.lua (center, radius, minZ, maxZ). To replace the circle with a custom shape, give a map three or more corners. There is no editor in this package. Either edit data/zones.json by hand while the resource is stopped, or build your own tool on the AdminZones and AdminSaveZones exports (your resource must be listed in Config.AdminResources).

data/zones.json is keyed by map id. zone is a list of corners. minZ and maxZ are optional and replace the config floor and roof:

{
  "morgue": {
    "zone": [
      { "x": 260.0, "y": -1370.0 },
      { "x": 290.0, "y": -1370.0 },
      { "x": 290.0, "y": -1350.0 },
      { "x": 260.0, "y": -1350.0 }
    ],
    "minZ": 17.0,
    "maxZ": 28.6
  }
}

With fewer than three corners the map keeps its config circle.

Exports#

Server:

  • exports['glitch-hideseek']:AdminZones() returns { maps = {...}, zones = {...} }, the maps and the saved play areas.
  • exports['glitch-hideseek']:AdminSaveZones(zones) validates and saves play areas to data/zones.json. It returns ok, message. Only this resource and the resources in Config.AdminResources can call it.
  • exports['glitch-hideseek']:ArcadeKick(src) removes a queued player from the lobby. glitch-arcade calls it when a player leaves every arcade zone.

Client:

  • exports['glitch-hideseek']:OpenFromArcade() opens the lobby window. glitch-arcade uses it for a machine set to Hide 'N Seek.

Limits and risks#

  • Only one match (series of rounds) runs at a time, with one lobby. A second group has to wait until it ends.
  • Rewards can be farmed. With perFind or participation set above 0, friends can queue together and pay each other. Both default to 0. If you turn them on, keep the amounts small and keep minPlayers and minSeekTime at sensible values.