• 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!

lever that create teleport with money

Sir MoX

New Member
Joined
Jan 14, 2009
Messages
285
Reaction score
1
hi I need a lever that you can only use it having 3k in the backpack and makes a teleport for only 2 seconds
 
Lua:
local topos, createpos, itemid = {x = 100, y = 100, z = 7}, {x = 200, y = 200, z = 7}, 1387

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getTileItemById(pos, 1387).uid < 1) then
		doPlayerSendCancel(cid, "A teleport is already on.")
	end
	if(getPlayerMoney(cid) < 3000) then
		doPlayerSendCancel(cid, "You don't have enought money.")
	end
	doPlayerRemoveMoney(cid, 3000)
	doCreateTeleport(itemid, topos, createpos)
	addEvent(doRemoveItem, 2 * 1000, getTileItemById(createpos, itemid).uid)
	return true
end
 
Back
Top