AddItem(Spawn: Player, Int32: ItemID, Int16: Quantity)
Pre-Requisite(s)
- None
Parameter(s)
Spawn: Player - Spawn LUA Pointer of Player type only.
Int32: ItemID - Database Item ID to provide the Player.
Int16: Quantity (OPTIONAL) - Allows creating a stack of items, if not specified quantity is default 1.
Return(s)
- If successful adding item to player, returns boolean TRUE
- If spawn does not exist, or the item cannot be added, returns boolean FALSE.
Example(s)
function hailed(NPC, Spawn)
if IsPlayer(Spawn) then
AddItem(Spawn, 36419) – Adds a Kejaan's herbal biscuit
Say(NPC, "Have a biscuit!")
end
end
Result
Additional Notes