• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Upgrader Action need help u will get points and rep++

DanneZ

Web-Scripting-Design-Host
Joined
Jan 16, 2010
Messages
84
Reaction score
2
Location
Sweden
I got problem with upgrader script for roxxor tfs 0.3.6. And version 4.0

When u use the upgrader it's only remove the item that u wanna upgrade not adding anything.

The Id it removes is 7460.

This script:
function onUse(cid, item, frompos, item2, topos)

if item.itemid == 2364 then

if doPlayerRemoveItem(cid,7460,1) == 1 then
doPlayerAddItem(cid,8908,1)
doPlayerAddItem(cid,2501,1)
doPlayerRemoveItem(cid,2364,1)
doPlayerSendTextMessage(cid,21,"Your Norse Shield has been splittet in 2 parts!")

else
doPlayerSendCancel(cid, "You do not have any pro items to uprgade!")
end
end
return 1
end

Please help me guys =/
 
Code:
local t = {
	[7460] = {items = {8908, 2501}, msg = 'Your Norse Shield has been splitted in 2 parts!'},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	for k, v in pairs(t) do
		if doPlayerRemoveItem(cid, k) then
			for i = 1, #v.items do
				doPlayerAddItem(cid, v.items[i], 1)
			end
			doRemoveItem(item.uid)
			doPlayerSendTextMessage(cid, 21, v.msg)
			return true
		end
	end
	return doPlayerSendCancel(cid, "You do not have any pro items to uprgade!")
end
 
Back
Top