Client
GetAppearance reads the local ped. The table is in the selected clothing script's own format, so it can be passed back to SetAppearance. A shop id is optional and only used by op-clothing and rcore_clothing.
GetAppearance
Parameters
None.
Returns
table — qb-clothing yields briefly to fetch the saved face from the server.
Example
local appearance = Bridge.GetAppearance()
print(json.encode(appearance))SetAppearance
Parameters
appearancetable— the table returned byGetAppearance
Returns
boolean
Example
local appearance = Bridge.GetAppearance()
if appearance then
Bridge.SetAppearance(appearance)
endOpenAppearance
Parameters
shopstring— optional shop id for op-clothing and rcore_clothing. Omit it to open the wardrobe or changing room.
Returns
boolean
Example
Bridge.OpenAppearance()
Bridge.OpenAppearance('binco')SetSkin
Sets clothing components and props in one format for every clothing script. Without ped it dresses the local player. A ped this client does not own is dressed by the client that owns it. Other players' peds are refused; dress those from server code.
Parameters
datatable— list of{ componentId, drawableId, texture }and{ propId, drawableId, texture }. AdrawableIdof-1removes that prop. The table returned byGetSkinis accepted as is.pednumber— optional ped entity
Returns
boolean — yields while a ped owned by another client is dressed.
Example
Bridge.SetSkin({
{ componentId = 11, drawableId = 55, texture = 0 },
{ componentId = 4, drawableId = 35, texture = 0 },
{ propId = 0, drawableId = -1, texture = 0 },
})
local ped = Bridge.GetClosestPed(nil, 3.0)
if ped ~= 0 then
Bridge.SetSkin({ { componentId = 8, drawableId = 15, texture = 0 } }, ped)
endGetSkin
Parameters
pednumber— optional ped entity. Defaults to the local player.
Returns
table|nil — components 0–11 and props 0, 1, 2, 6 and 7 in the SetSkin format. nil when the ped does not exist.
Example
local saved = Bridge.GetSkin()
Bridge.SetSkin({ { componentId = 11, drawableId = 15, texture = 0 } })
Wait(5000)
Bridge.SetSkin(saved)