UnhitchHorse
Takes a player’s horse from a cart; it stands beside it again.
The slot is left empty ("none") - give it the cart’s own horse back with SetCartPart and a coat. slot 0 takes
the first player’s horse there is.
Syntax
Section titled “Syntax”UnhitchHorse(id [, slot])| Parameter | Type | |
|---|---|---|
id |
number | the cart |
slot |
number | 1, 2, or 0 / nil = the first hitched (optional) |
Returns
Section titled “Returns”number - the horse, standing beside the cart; nil when no player’s horse was there
Example
Section titled “Example”local horse = UnhitchHorse(cart, 1)if horse then SetCartPart(cart, "horse1", "chestnut") end -- the cart's own horse againSee also
Section titled “See also”HitchHorse · the Carts group of the index
