Skip to main content

Peds

All the pool ped related functions.

GetAll

Function

local Pools = WXSCore.Pools
Pools.Peds:GetAll()

Returns

NameTypeDescription
pedsnumber[]A table of all the ped handles.

Example

local Pools = WXSCore.Pools
local peds = Pools.Peds:GetAll()

GetInArea

Function

local Pools = WXSCore.Pools
Pools.Peds:GetInArea(coords, radius)

Parameters

NameTypeDescription
coordsvector3The coordinates of the area.
radiusfloatThe radius of the area.

Returns

NameTypeDescription
pedsnumber[]A table of all the ped handles in the area.

Example

local Pools = WXSCore.Pools
local peds = Pools.Peds:GetInArea(vector3(0.0, 0.0, 0.0), 100.0)

GetClosest

Function

local Pools = WXSCore.Pools
Pools.Peds:GetClosest(coords)

Parameters

NameTypeDescription
coordsvector3The coordinates of the area.

Returns

NameTypeDescription
pednumberThe handle of the closest ped.
distancefloatThe distance to the closest ped.

Example

local Pools = WXSCore.Pools
local ped, distance = Pools.Peds:GetClosest(vector3(0.0, 0.0, 0.0))