GetHorseStats
Every stat a mode set on a horse.
What SetHorseStat gave the horse, by name - the thing to save with a horse a mode keeps. A stat that was never set is
not in it; one set to 0 is, with 0 - this is the call that tells the two apart.
Syntax
Section titled “Syntax”GetHorseStats(id)| Parameter | Type | |
|---|---|---|
id |
number | the horse |
Returns
Section titled “Returns”table | nil - {strength = 25, courage = 10}; {} when none was set; nil when it is not a horse
Example
Section titled “Example”local saved = {}for stat, level in pairs(GetHorseStats(horse) or {}) do saved[#saved + 1] = stat .. "=" .. level endSetEntityData(horse, "saved_stats", table.concat(saved, ","))See also
Section titled “See also”SetHorseStat · GetHorseStat · GetHorseItems · the Horses group of the index
