Hammel
Mapper
- Joined
- Dec 14, 2009
- Messages
- 37
- Reaction score
- 0
I did a treiner system in my server, but have one problem.
I don't know how I can make a script that don't have two players at the same local in the same time. Another thing is I dkn how I can teleport in a specifial local to other.
Someone can help me?
This is the script:
I don't know how I can make a script that don't have two players at the same local in the same time. Another thing is I dkn how I can teleport in a specifial local to other.
Someone can help me?
This is the script:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = {x = 32298, y = 32230, z = 15}
if itemEx.uid == 19000 then
doTeleportThing(cid, {x = 32298, y = 32230, z = 15})
doSendMagicEffect({x = 32300, y = 32229, z = 15},17)
elseif itemEx.uid == 19001 then
doTeleportThing(cid, {x = 32300, y = 32230, z = 15})
doSendMagicEffect({x = 32298, y = 32229, z = 15},10)
elseif isPlayerPosition (cid, pos) then
doPlayerSendDefaultCancel(cid, pos)
doPlayerSendCancel(cid,"Can't have two players here.")
return TRUE
end
if itemEx.uid == 19002 then
doTeleportThing(cid, {x = 32298, y = 32234, z = 15})
doSendMagicEffect({x = 32300, y = 32233, z = 15},17)
elseif itemEx.uid == 19003 then
doTeleportThing(cid, {x = 32300, y = 32234, z = 15})
doSendMagicEffect({x = 32298, y = 32233, z = 15},10)
return TRUE
end
if itemEx.uid == 19004 then
doTeleportThing(cid, {x = 32298, y = 32238, z = 15})
doSendMagicEffect({x = 32300, y = 32237, z = 15},17)
elseif itemEx.uid == 19005 then
doTeleportThing(cid, {x = 32300, y = 32238, z = 15})
doSendMagicEffect({x = 32298, y = 32237, z = 15},10)
return TRUE
end
if itemEx.uid == 19006 then
doTeleportThing(cid, {x = 32298, y = 32242, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32300, y = 32241, z = 15},17)
elseif itemEx.uid == 19007 then
doTeleportThing(cid, {x = 32300, y = 32242, z = 15})
doSendMagicEffect({x = 32298, y = 32241, z = 15},10)
return TRUE
end
if itemEx.uid == 19008 then
doTeleportThing(cid, {x = 32298, y = 32246, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32300, y = 32245, z = 15},17)
elseif itemEx.uid == 19009 then
doTeleportThing(cid, {x = 32300, y = 32246, z = 15})
doSendMagicEffect({x = 32298, y = 32245, z = 15},10)
return TRUE
end
if itemEx.uid == 19010 then
doTeleportThing(cid, {x = 32298, y = 32250, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32300, y = 32249, z = 15},17)
elseif itemEx.uid == 19011 then
doTeleportThing(cid, {x = 32300, y = 32250, z = 15})
doSendMagicEffect({x = 32298, y = 32249, z = 15},10)
return TRUE
end
if itemEx.uid == 19012 then
doTeleportThing(cid, {x = 32298, y = 32254, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32300, y = 32253, z = 15},17)
elseif itemEx.uid == 19013 then
doTeleportThing(cid, {x = 32300, y = 32254, z = 15})
doSendMagicEffect({x = 32298, y = 32253, z = 15},10)
return TRUE
end
if itemEx.uid == 19014 then
doTeleportThing(cid, {x = 32294, y = 32254, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32292, y = 32253, z = 15},17)
elseif itemEx.uid == 19015 then
doTeleportThing(cid, {x = 32292, y = 32254, z = 15})
doSendMagicEffect({x = 32294, y = 32253, z = 15},10)
return TRUE
end
if itemEx.uid == 19016 then
doTeleportThing(cid, {x = 32294, y = 32250, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32292, y = 32249, z = 15},17)
elseif itemEx.uid == 19017 then
doTeleportThing(cid, {x = 32292, y = 32250, z = 15})
doSendMagicEffect({x = 32294, y = 32249, z = 15},10)
return TRUE
end
if itemEx.uid == 19018 then
doTeleportThing(cid, {x = 32294, y = 32246, z= 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32292, y = 32245, z= 15},17)
elseif itemEx.uid == 19019 then
doTeleportThing(cid, {x = 32292, y = 32246, z = 15})
doSendMagicEffect({x = 32294, y = 32245, z = 15},10)
return TRUE
end
if itemEx.uid == 19020 then
doTeleportThing(cid, {x = 32294, y = 32242, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32292, y = 32241, z = 15},17)
elseif itemEx.uid == 19021 then
doTeleportThing(cid, {x = 32292, y = 32242, z = 15})
doSendMagicEffect({x = 32294, y = 32241, z = 15},10)
return TRUE
end
if itemEx.uid == 19022 then
doTeleportThing(cid, {x = 32294, y = 32238, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32292, y = 32237, z = 15},17)
elseif itemEx.uid == 19023 then
doTeleportThing(cid, {x = 32292, y = 32238, z = 15})
doSendMagicEffect({x = 32294, y = 32237, z = 15},10)
return TRUE
end
if itemEx.uid == 19024 then
doTeleportThing(cid, {x = 32294, y = 32234, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32292, y = 32233, z = 15},17)
elseif itemEx.uid == 19025 then
doTeleportThing(cid, {x = 32292, y = 32234, z = 15})
doSendMagicEffect({x = 32294, y = 32233, z = 15},10)
return TRUE
end
if itemEx.uid == 19026 then
doTeleportThing(cid, {x = 32294, y = 32230, z = 15})
doPlayerRemoveItem(cid,2157,1)
doSendMagicEffect({x = 32292, y = 32229, z = 15},17)
elseif itemEx.uid == 19027 then
doTeleportThing(cid, {x = 32292, y = 32230, z = 15})
doSendMagicEffect({x = 32294, y = 32229, z = 15},10)
return TRUE
end
return FALSE
end
Last edited: