StopCarry
Puts down the carry of a player - the carrier or the carried one.
pid is either party - the carrier or the carried player - and which one may order it is the mode’s to decide: a
command that lets players put down what they carry should check IsPlayerCarrying first, or the carried player ends his
own carry by typing it. The carrier’s game plays the put-down (about two seconds), and the body lies where the game puts it - or
at x, y, z (and yaw, degrees - which counts only together with x, y, z, with immediate too) when they are given;
OnPlayerCarryEnd follows with "mode". A put ordered while the
grab still goes on (the first three seconds) waits for it to finish, then plays. With immediate the carry ends now, with no
animation, the body at the place given or a step ahead of the carrier. false when pid is neither carrying nor carried.
Syntax
Section titled “Syntax”StopCarry(pid [, x, y, z, yaw, immediate])| Parameter | Type | |
|---|---|---|
pid |
number | the carrier, or the carried player |
x |
number | metres - where the body is to lie (optional) |
y |
number | metres (optional) |
z |
number | metres (optional) |
yaw |
number | degrees - the body’s heading there; used only together with x, y, z, ignored alone (optional) |
immediate |
boolean | true to end it at once, without the put-down (optional) |
Returns
Section titled “Returns”boolean - false when there was no carry to stop
Example
Section titled “Example”-- /putdown: the caller puts down what they carry (only the carrier - StopCarry alone would also take the carried-- player's own call); /release: a mode's cells take the prisoner at onceif cmd == "putdown" then if IsPlayerCarrying(pid) then StopCarry(pid) end return trueendif cmd == "release" then StopCarry(GetPlayerId(args), 120.0, 40.5, 12.0, 90, true) return true endSee also
Section titled “See also”CarryPlayer · CarryEntity · OnPlayerCarryEnd · ActorPutDown · the Carrying group of the index
