Skip to content

OnPlayerCarryEnd

A carry is over - the body lies at x, y, z.

reason is one of: "put down" (the carrier’s own put), "mode" (StopCarry, or the mode knocked the carrier out), "hit" (the game broke the carry off - a blow on the carrier), "failed" (the carrier’s game could not take the body), "timeout" (a grab or a put that never finished), "carrier died", "target died" (a carried player or actor), "carrier left", "target left", "moved" (the server moved one of them - SetPlayerPos - or put one of them in another virtual world - SetPlayerVirtualWorld, SetEntityVirtualWorld), "respawned", "mounted", "cart", "flying", or "destroyed" (the body, or the actor that carried it, was removed). Every reason but "put down", "hit", "failed" and "mode" from a put is a forced end: the screens let go at once.

A player put down by the carry has a short allowance after it for the games’ own put (see the group’s description); a body that is an entity lies at x, y, z for everyone, and a dead player’s corpse is searched there. When the server put the body nowhere itself - "failed" (the body was never lifted), or the server moved the carried player ("moved", "respawned", "mounted", "cart") or lost the body ("target left", "destroyed") - x, y, z is the place the server’s record has it at that moment: for a player the server moves, the place he is moved from. Not run for a carry an NPC actor makes.

function OnPlayerCarryEnd(pid, kind, id, reason, x, y, z)
-- ...
end
Parameter Type
pid number the carrier
kind string "player", "corpse" or "actor"
id number the player’s id, or the entity id
reason string why it ended
x number metres - where the body lies
y number metres
z number metres

nothing

function OnPlayerCarryEnd(pid, kind, id, reason, x, y, z)
if kind == "player" and reason == "put down" then
SendClientMessage(pid, COLOR_SERVER, "You put " .. GetPlayerName(id) .. " down.")
end
end

OnPlayerCarryStart · StopCarry · GetPlayerCarrying · the Carrying group of the index