SetPlayerRiderThrow
Turns the throws off for a rider - a head hit, the horse and ThrowPlayerFromHorse no longer take them off their horse.
With false none of those throws this rider: not a head hit, not the horse, not ThrowPlayerFromHorse (which then
answers false and the reason). On by default, as in the game. It lasts until you change it or the player leaves, through
respawns, and is sent to their game with every spawn. SetPlayerRiderHeadHit alone keeps the rest.
A pull-down is not a throw: it is another player’s move, with its own switch (SetPlayerPullDown, who may pull) and its
own veto (OnPlayerPullDown, which can refuse it for a rider), and neither that nor PullPlayerFromHorse reads this
setting: a mode that keeps a rider in the saddle refuses their pull-downs there as well.
Syntax
Section titled “Syntax”SetPlayerRiderThrow(pid [, enabled])| Parameter | Type | |
|---|---|---|
pid |
number | the rider |
enabled |
boolean | false for no head hit, horse or ThrowPlayerFromHorse throw; true (the default, also when left out) for the game’s own rules (optional) |
Returns
Section titled “Returns”boolean - false when the player is not connected
Example
Section titled “Example”-- the wagoners' guild members are never thrown by a branch or a horse, and nobody pulls them off eitherfunction OnPlayerSpawn(pid) if GetPlayerData(pid, "guild") == "wagoner" then SetPlayerRiderThrow(pid, false) endend
function OnPlayerPullDown(pid, victim, id) if GetPlayerData(victim, "guild") == "wagoner" then return false endendSee also
Section titled “See also”SetPlayerRiderHeadHit · ThrowPlayerFromHorse · OnPlayerThrown · OnPlayerPullDown · the Horses group of the index
