SetHorseCoat
Sets a horse’s coat - its colour, mane and tail - on every screen.
coat is one of GetHorseCoats ("black", "chestnut", "palomino" …; any case), the same coats a cart’s horses wear
(SetCartPart’s horse1 / horse2). The horse changes at once on every screen that has it, the rider’s included, and
keeps its gear. A horse never given one wears a pick from the ten coats that changes with the horse’s id (two horses can share
one) - so a mode that keeps horses saves the coat (GetHorseCoat) and gives it back, best straight in CreateHorse so it never shows another.
nil or "" goes back to the pick.
Syntax
Section titled “Syntax”SetHorseCoat(id [, coat])| Parameter | Type | |
|---|---|---|
id |
number | the horse |
coat |
string | one of GetHorseCoats; nil = the pick that goes with the horse’s id again (optional) |
Returns
Section titled “Returns”boolean - false when it is not a horse or the coat is no coat
Example
Section titled “Example”-- /paint chestnut: the rider's horse a new colourlocal horse = GetPlayerMount(pid)if horse and not SetHorseCoat(horse, args) then SendClientMessage(pid, "Coats: " .. table.concat(GetHorseCoats(), ", "))endSee also
Section titled “See also”GetHorseCoat · GetHorseCoats · CreateHorse · SetCartPart · the Horses group of the index
