Ward_214
Pro PvP
- Joined
- Dec 11, 2008
- Messages
- 297
- Reaction score
- 0
Can anyone tell me whats wrong w/ this script?
Code:
local places = {
["temple"] = {position = {x=1052, y=1052, z=8}, level = 0},
["depot"] = {position = {x=96, y=118, z=7}, level = 0},
["hunting"] = {position = {x=90, y=119, z=7}, level = 0}
}
function onSay(cid, words, param)
local tp = places[param]
if (param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Write a position you want to be teleported to.")
return TRUE
end
if getPlayerStorageValue(cid, prem) < 1 then
doPlayerSendCancel(cid, "You must buy this command from idk yet.")
return TRUE
end
if getPlayerLevel(cid) < tp.level then
doPlayerSendCancel(cid, "Sorry,only players level " ..tp.level.. " can use this command.")
return TRUE
end
if (hasCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendCancel(cid, "Sorry, you have are pz'd")
return TRUE
end
if getPlayerStorageValue(cid, 1156) == 1 then
doTeleportThing(cid, tp.position)
doSendMagicEffect(getPlayerPosition(cid), 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You teleported to ".. param .." !")
return TRUE
end
end