Baneczek
うさちゃん
Hello guys, i need some help. I wrote a script, that teleports me and my target when i say "teleportnow".
It works ok, but it also teleports me alone, when i don't have any target.
Could you please help me? What should i do with it to not teleport me when i don't have any target?
Here is a script:
It works ok, but it also teleports me alone, when i don't have any target.
Could you please help me? What should i do with it to not teleport me when i don't have any target?
Here is a script:
Code:
function onSay(cid, words, param, channel)
local teleport = { x = 488, y = 431, z = 7 }
local teleport2 = { x = 488, y = 432, z = 7 }
local cel = getCreatureTarget(cid)
local nazwa = getCreatureName(getCreatureTarget(cid))
if getCreatureName(cel) == nazwa then
doTeleportThing(cid, teleport2)
doTeleportThing(cel, teleport)
else
doPlayerSendCancel(cid,"Error")
end
return true
end