Skip to content

PullPlayerFromHorse

Has a player on foot pull a rider off their horse - the game’s take-down, on order.

The same move as the prompt, done on your word: the puller (on foot, beside the horse) and the rider play the game’s pair on their own screens and on those of everyone who has all three bodies, the two are in a fight from the start (where [combat] pvp allows fights), and OnPlayerPulledDown tells the outcome. It skips the weapon’s reach and the horse’s pace, pvp, teams and parties, the wall check, the rider’s SetPlayerRiderThrow rule, the player’s right (SetPlayerPullDown) and OnPlayerPullDown. success false plays the failed pair - the rider stays in the saddle; nil or true throws them off.

false and the reason (“The rider is not on a horse.”, “They are 9.1 m apart (6 m at most).” …) when the puller and the rider are one player, the rider is not in the saddle of a horse, the puller is dead or either player is not standing in the world, the rider is in another virtual world, either player is in a pull-down or a fall already, in a cart, flying, playing dice, in a shop or a dialogue, the puller is on a horse, the puller is more than 6 metres from the horse or the two do not have each other’s bodies yet, or the puller’s game cannot play the move (an unsupported build).

PullPlayerFromHorse(victim, puller [, success])
Parameter Type
victim number the rider
puller number the player who pulls them off
success boolean false for the failed pair; true or nil (the default) for the pull that throws the rider off (optional)

boolean, string - true when the pull-down started; false and the reason when it did not

-- /unhorse <player>: an admin pulls the named rider off their horse (the admin stands on foot within 6 m of it)
function OnPlayerCommandText(pid, cmd, args)
if cmd ~= "unhorse" or not IsPlayerAdmin(pid) then return false end
local ok, why = PullPlayerFromHorse(GetPlayerId(args), pid)
if not ok then SendClientMessage(pid, COLOR_RED, why) end
return true
end

OnPlayerPulledDown · OnPlayerPullDown · SetPlayerPullDown · IsPlayerInPullDown · the Horses group of the index