Skip to content

GetHorseLook

A horse’s look.

The look a mode gave the horse (SetHorseLook) - only its parts, {} for none - or, with shown, every part the horse shows: the look’s, and the coat’s own where the look leaves one out. LookToString makes the line a database keeps.

GetHorseLook(id [, shown])
Parameter Type
id number the horse
shown boolean true = every part it shows, its coat’s filled in (optional)

table | nil - {body, mane, tail} (parts left out missing); nil when it is not a horse

db:Execute("UPDATE stable SET look = ? WHERE id = ?", {LookToString(GetHorseLook(horse)), GetEntityData(horse, "stable_id")})
local shown = GetHorseLook(horse, true)
SendClientMessage(pid, "Your horse: " .. shown.body .. ", " .. shown.mane .. ", " .. shown.tail)

SetHorseLook · GetHorseCoat · the Horses group of the index