Spawn
Thespawn module is available on the client. It spawns peds and objects, applies common entity options, supports proximity-based streaming with ox_lib points, and tracks handles for cleanup.
Spawn a ped
Spawn an object
Options
Proximity streaming
UsespawnOnNear when an entity should only exist while the player is close to a point.
Scoped cleanup
Scopes let you clean up a set of spawned handles and stream entries together.Deletes every globally tracked spawned entity and removes all stream points registered through the module.
sure_lib also calls
spawn:deleteAll() when the current resource stops.