drax skylon
o.O DrAx O.o
- Joined
- Sep 9, 2008
- Messages
- 225
- Reaction score
- 3
Hello!
Well...I have add a system in my server for players buy backpacks of potions by pushing a lever.
It was working perfectly when I was using TFS Crying Damson (8.41)
Now I have updated my server for TFS Crying Damson PL2 (8.42) and it are bugging...
Here is one script (Great Health Potion)
Now when a player use the lever (ID:1945 UID:6502) he/she lost the money but do not receive his/her backpack and the lever do not change to ID:1946
Please help me!
Thanks a lot.
Well...I have add a system in my server for players buy backpacks of potions by pushing a lever.
It was working perfectly when I was using TFS Crying Damson (8.41)
Now I have updated my server for TFS Crying Damson PL2 (8.42) and it are bugging...
Here is one script (Great Health Potion)
function onUse(cid, item, fromPosition, itemEx, toPosition)
local container = 0
local cost = 3825
local potion_id = 7591
local backpack_id = 2000
if item.uid == 6502 and item.itemid == 1945 then
if doPlayerRemoveMoney(cid, cost) == 1 then
doTransformItem(item.uid, item.itemid+1)
container = doPlayerAddItem(cid, backpack_id, 1)
for i = 1, 20 do
doAddContainerItem(container, potion_id)
end
else
doPlayerSendCancel(cid,"Sorry, you don't have enough money.")
end
elseif item.uid == 6502 and item.itemid == 1946 then
doTransformItem(item.uid, item.itemid-1)
end
return TRUE
end
Now when a player use the lever (ID:1945 UID:6502) he/she lost the money but do not receive his/her backpack and the lever do not change to ID:1946
Please help me!
Thanks a lot.