Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onSay(cid, words, param)
- local T = string.explode(param, ",")
- local subType = tonumber(T[3]) and T[3] or 1
- local player = getPlayerByNameWildcard(T[1])
- local itemName = getItemNameById(T[2])
- local itemV = doCreateItemEx(T[2], T[3])
- local weight = getItemWeight(T[2]) * subType
- if (tostring(T[1]) and tonumber(T[2])) then
- if player then
- if getPlayerFreeCap(player) > weight then
- doPlayerAddItem(player, T[2], subType)
- doPlayerSendTextMessage(cid, 27, "You has been added " .. subType .. "x " .. itemName .. " to " .. T[1] .. ".")
- doPlayerSendTextMessage(player, 27, "You received " .. subType .. "x " .. itemName .. ".")
- else
- doPlayerSendMailByName(T[1], itemV)
- doPlayerSendTextMessage(cid, 27, "You send " .. subType .. "x " .. itemName .. " to " .. T[1] .. " depots.")
- doPlayerSendTextMessage(player, 27, "You received one items, there's in your depot.")
- end
- else
- doPlayerSendMailByName(T[1], itemV)
- doPlayerSendTextMessage(cid, 27, "You send " .. subType .. "x " .. itemName .. " to " .. T[1] .. " depots.")
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement