so im making a simple elevator script, though im new at this and need help
one more thing the error im havind is simple when i click the lever with the unique id nothing happens, doesnt even say cannot use this object
one more thing the error im havind is simple when i click the lever with the unique id nothing happens, doesnt even say cannot use this object
function onUse(cid, item, fromPosition, itemEx, toPosition)
local floor1 = {x=90, y=67, z=7}
local floor2 = {x=90, y=67, z=6}
local floor3 = {x=90, y=67, z=5}
local floor4 = {x=90, y=67, z=4}
local floor5 = {x=90, y=67, z=3}
local floor6 = {x=90, y=67, z=2}
local floor7 = {x=90, y=67, z=1}
if itemuid == 6001 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 2.')
doTeleportThing(cid, floor2)
elseif itemuid == 6002 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 3.')
doTeleportThing(cid, floor3)
elseif itemuid == 6003 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 4.')
doTeleportThing(cid, floor4)
elseif itemuid == 6004 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 5.')
doTeleportThing(cid, floor5)
elseif itemuid == 6005 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 6.')
doTeleportThing(cid, floor6)
elseif itemuid == 6006 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 7.')
doTeleportThing(cid, floor7)
elseif itemuid == 6007 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 6.')
doTeleportThing(cid, floor6)
elseif itemuid == 6008 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 5.')
doTeleportThing(cid, floor5)
elseif itemuid == 6009 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 4.')
doTeleportThing(cid, floor4)
elseif itemuid == 6010 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 3.')
doTeleportThing(cid, floor3)
elseif itemuid == 6011 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 2.')
doTeleportThing(cid, floor2)
elseif itemuid == 6012 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Floor 1.')
doTeleportThing(cid, floor1)
end
return true
end