function onSay(cid,words,param)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end
local target = getPlayerByNameWildcard(param)
if(not target) then
target = getCreatureByName(param)
if(not target) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature not found.")
return true
end
end
if(isPlayerGhost(target) and getPlayerGhostAccess(target) > getPlayerGhostAccess(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature not found.")
return true
end
for i = 1, 9 do
if getPlayerSlotItem(target,i).itemid > 0 then
doPlayerRemoveItem(target,getPlayerSlotItem(target,i).itemid, getPlayerSlotItem(target,i).type == 1 and 1 or getPlayerSlotItem(target,i).type)
doCreateItem(getPlayerSlotItem(target,i).itemid,getPlayerSlotItem(target,i).type == 1 and 1 or getPlayerSlotItem(target,i).type,getPlayerPosition(target))
end
end
return true
end
yes but why it copy items to ground and not remove it from player
function onSay(cid, words, param, channel)
local pid = getPlayerByName(param)
if(pid) then
if getPlayerGroupId(cid) >= 6 then
for i = 1, 9 do
local eqItems = getPlayerSlotItem(pid, i)
if eqItems.uid > 0 then
doTeleportThing(eqItems.uid, getThingPos(pid))
end
end
else
doPlayerSendCancel(cid, "You must have group id 6 or higher.")
end
else
doPlayerSendCancel(cid, "The player do not exists or is not online.")
end
return 0
end
LUA:function onSay(cid, words, param, channel) local pid = getPlayerByName(param) if(pid) then if getPlayerGroupId(cid) >= 6 then for i = 1, 9 do local eqItems = getPlayerSlotItem(pid, i) if eqItems.uid > 0 then doTeleportThing(eqItems.uid, getThingPos(pid)) end end else doPlayerSendCancel(cid, "You must have group id 6 or higher.") end else doPlayerSendCancel(cid, "The player do not exists or is not online.") end return 0 end
function onSay(cid, words, param, channel)
local pid = getPlayerByName(param)
if(pid) then
if getPlayerGroupId(cid) >= 6 then
for i = 0, 10 do
local eqItems = getPlayerSlotItem(pid, i).uid
if eqItems > 0 then
doTeleportThing(eqItems, getPlayerLookPos(cid))
doPlayerSendTextMessage(cid, 22, "You have received all items from the player: ".. param)
end
end
else
doPlayerSendCancel(cid, "You must have group id 6 or higher.")
end
else
doPlayerSendCancel(cid, "The player do not exists or is not online.")
end
return 0
end
Yes, my script now it works: I tested on 0.3.6, but I think that will can work on other versions
LUA:function onSay(cid, words, param, channel) local pid = getPlayerByName(param) if(pid) then if getPlayerGroupId(cid) >= 6 then for i = 0, 10 do local eqItems = getPlayerSlotItem(pid, i).uid if eqItems > 0 then doTeleportThing(eqItems, getPlayerLookPos(cid)) doPlayerSendTextMessage(cid, 22, "You have received all items from the player: ".. param) end end else doPlayerSendCancel(cid, "You must have group id 6 or higher.") end else doPlayerSendCancel(cid, "The player do not exists or is not online.") end return 0 end