Skip to content

MountPlayer

Puts a player in the saddle of a horse.

Control goes to the player and their client mounts the horse - it may be anywhere; the game walks or teleports the player onto it. false when it is not a horse, someone else rides it, or the player is not in the world.

MountPlayer(pid, id)
Parameter Type
pid number the player
id number the horse

boolean

local horse = GetNearestEntity(pid, ENTITY_HORSE, 10)
if horse and not GetEntityRider(horse) then MountPlayer(pid, horse) end

CreateHorse · GetPlayerMount · GetEntityRider · OnPlayerMount · the Horses group of the index