Skip to content

GetPlayerHorses

Every horse in the world the player owns.

GetPlayerHorses(pid)
Parameter Type
pid number the player

table - a list of horse entity ids ({} for none)

-- a stable: every horse of theirs but the one they ride goes away (saved by the mode, made again on the way out)
for _, id in ipairs(GetPlayerHorses(pid)) do
if id ~= GetPlayerMount(pid) then DestroyEntity(id) end
end

SetHorseOwner · GetHorseOwner · GetPlayerHorse · the Horses group of the index