i got this
its an action to sell bps of runes and stuff
the problem is when u try to buy it and no have capasity it only remove money and u dont get the back pack...
so i want to know how to call weight from player
srry for my english D:
edit--
jojoo srry is not weight from a player is capacity from a player
edit-- well never mind i found the solution in other post
my bad for not searching first srry
Code:
gmp_id = 7590 -- Item a ser vendido
backpackgmp_id = 9774 -- Backpack
custogmp_id = 2400 -- Valor
cargasgmp_id = 20 -- Cargas
local name = getItemNameById(gmp_id)
----- End Config -----
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, custogmp_id) == TRUE then
local bag = doPlayerAddItem(cid, backpackgmp_id, 1)
doSendAnimatedText(fromPosition, "Purchased", TEXTCOLOR_YELLOW)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have purchased a backpack of ".. name .."s for ".. custogmp_id .." gold.")
for i=1,20 do
doAddContainerItem(bag, gmp_id, cargasgmp_id)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need ".. custogmp_id .." gold coins for a backpack of ".. name .."s.")
end
return FALSE
end
its an action to sell bps of runes and stuff
the problem is when u try to buy it and no have capasity it only remove money and u dont get the back pack...
so i want to know how to call weight from player
srry for my english D:
edit--
jojoo srry is not weight from a player is capacity from a player
edit-- well never mind i found the solution in other post
my bad for not searching first srry
Last edited: