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, the player is not in the world, the player is in a pull-down (IsPlayerInPullDown) or is knocked out (IsPlayerKnockedOut); also while the horse is part of a running pull-down that is not already the player’s to control - it cannot change hands until the pull-down ends, a few seconds on. A player who carries or is carried is mounted, and the carry ends (OnPlayerCarryEnd says "mounted").

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