Static NPCs: never spawn networked peds from far away — OneSync streams the first copy then the client creates a second
A frozen shop/ranch NPC created with CreatePed(..., isNetwork=true) from character-select (player still far from the coords) is a world entity. When the player later enters streaming range they already see that ped appear. If the client handle was culled (DoesEntityExist false) or another client also runs the same spawn, a second CreatePed fires on zone entry → visible duplicate.
Fix for decorative/static NPCs:
CreatePed(model, x, y, z, heading, false, true, false, false)— local only (isNetwork=false). Each client has its own copy; OneSync will not stream someone else's.- Spawn only when the player is within ~80m (collision + ped pool are loaded).
- Before creating, scan
GetGamePool('CPed')for the same model within a few metres and reuse/delete extras instead of spawning. - Do not treat a stale handle as “missing” and recreate without that scan — the networked leftover is often about to stream in.
Pattern used by hyp_pedspawner: local peds. BccUtils.Ped:Create(..., networked=true) is the trap.
Tags: peds, onesync, create_ped, duplicates, spawn
Category: natives
Source: vorp-bcc-ranch
Created: 2026-08-20T16:09:43.685Z