Pedplacer
Populate your world exactly how you want it. Place individual NPCs or full crowds anywhere on the map, assign scenarios and animations, then save and reload them automatically on restart.
Place, persist and manage world NPC peds — in-game, with a menu.
gas-pedplacer is an admin tool for building living worlds. Walk up to a spot, open a menu, and drop an NPC that stays there forever (saved to your database) and streams in/out by distance so you never blow GTA's ped pool. Peds can idle, run any GTA scenario, walk patrol routes, wander, hold weapons, be frozen or invincible, and — uniquely — loop any scully_emotemenu emote (with held props) as a permanent animation. Group peds together to hide/show or delete a whole business at once. Also places persistent radios/speakers and metal detectors.
✨ Features
- Persistent peds saved to MySQL — survive restarts and server reboots.
- Smart streaming + cull-detection — peds spawn only when you're near, and if the engine culls one (common in MLOs) it silently respawns. No more "peds vanish until I restart the resource."
- Emote bridge — loop ANY emote from
scully_emotemenu(animation + held props like a beer, clipboard, cigar) as a persistent ped scenario. - Behaviors: idle, GTA scenario, patrol route (multi-point), wander, and paired interactions.
- Weapons, freeze, invincibility per ped.
- Groups & area visibility — save nearby peds as a named group; hide/show or delete an entire group or map area at runtime (great for open/closed businesses).
- Bonus entities: placeable radios/speakers and metal-detector props.
- Developer export API (see below) — other resources can query and control peds.
- Fully data-driven config — 300+ ped-model presets, scenarios, weapons, radios.
- Framework-light — needs only
ox_lib+oxmysql; QBCore/Qbox is auto-detected and optional (permissions fall back to server ACE).
📦 Requirements
Required: ox_lib, oxmysql
Optional integrations (auto-detected, degrade gracefully if absent):
scully_emotemenu— enables the emote bridge (place peds that loop emotes + props).rr-bartender— bartender-behavior peds register as drink-order points.- A casino dealer placer + a
metal-detectorsresource — for those bonus entity types.
Works on Qbox and QBCore out of the box. Runs on any framework via the ACE permission fallback (see Permissions).
🔧 Installation
- Drop the
gas-pedplacerfolder into yourresourcesdirectory. - Import
sql/peds.sqlinto your database (createsplaced_peds,ped_groups,placed_radios,placed_metaldetectors). Tables also self-create on first start. - Add
ensure gas-pedplacerto yourserver.cfg. - Restart the server.
🎮 Usage
- Open the placer menu in-game with
/pedplacer(command configurable viaConfig.Command). - Requires admin permission (
Config.RequiredPermission, defaultadmin) or the server ACEcommand.pedplacer. - Everything else — placing, moving, grouping, deleting, patrol routes, emotes — is done through the ox_lib menus. Placement data lives in the DB, not in code.
🔐 Permissions
Admin gating is ACE-based and configurable. On boot the resource runs: add_ace group.admin command.pedplacer allow. Grant additional admins via your normal ACE setup, or change Config.RequiredPermission. On QBCore/Qbox it also accepts that framework's permission check.
🧩 Developer API (exports)
Client:
| Export | Purpose |
|---|---|
exports['gas-pedplacer']:GetPedHandle(dbId) | live ped entity handle for a DB id |
exports['gas-pedplacer']:GetPedData(dbId) | stored data for a placed ped |
exports['gas-pedplacer']:GetPedsByGroup(name) | peds in a named group |
exports['gas-pedplacer']:GetGuardPeds() | armed/guard peds (for defense scripts) |
exports['gas-pedplacer']:GetSpawnedPeds() | all currently-spawned placed peds |
Server:
| Export | Purpose |
|---|---|
exports['gas-pedplacer']:SetGroupHidden(group, hidden) | despawn/respawn a whole group for everyone |
exports['gas-pedplacer']:SetAreaHidden(key, x, y, radius, hidden) | hide/show every placed ped in a radius |
Server callbacks (lib.callback) are also available: getPeds, getGroups, getRadios, getDetectors, getHiddenGroups, getHiddenAreas.
⚙️ Configuration highlights (config.lua)
Config.Command/Config.RequiredPermission— command + admin gate.Config.PermanentPeds— keep peds permanently loaded vs. stream by distance (leavefalseunless you place only a few dozen).Config.RenderDistance— how close before a ped spawns.Config.PedModels— 300+ categorized model presets buyers can extend.Config.Scenarios,Config.Weapons,Config.RadioStations,Config.SpeakerModels,Config.PresetGroups— all data-driven and editable.
Credits
© Gas Team Developers. All rights reserved.
