GivePlayerCarryItem
Makes a new carry item and puts it in a player’s hands.
The item (as in CreateCarryItem) is made at the player’s feet - half a metre in front of him, or right where he stands with
atOnce - and he picks it up at once, the mode’s own order (PickUpCarryItem’s checks, without the reach). nil and the
reason when the item is unknown or he cannot carry it now (the new item is removed again then).
Syntax
Section titled “Syntax”GivePlayerCarryItem(pid, item [, atOnce])| Parameter | Type | |
|---|---|---|
pid |
number | the player |
item |
string | the item’s name, id or class GUID |
atOnce |
boolean | true: the other players see it in his hands at once (optional) |
Returns
Section titled “Returns”number | nil, string - the new item’s entity id; nil and the reason when none was given
Example
Section titled “Example”-- the quartermaster hands out a bucketlocal id, why = GivePlayerCarryItem(pid, "waterBucket")if not id then SendClientMessage(pid, COLOR_RED, why) endSee also
Section titled “See also”PickUpCarryItem · TakePlayerCarryItem · CreateCarryItem · the Carry items group of the index
