Witam, mam prosbe. Kto Mi Przerobi Ten Skrypt, ze gdy chcemy tp potrzebujemy item o danym id, a nie kase.
Code:
function onSay(cid, words, param, channel)
local money = 10000
local pPos = getPlayerPosition(cid)
local newP = {x=1000, y=1000, z=7}
if getPlayerLevel(cid) <= 100 then
doPlayerSendCancel(cid, "Do not have a 100 level.")
elseif(isPlayerPzLocked(cid) == true) then
doPlayerSendCancel(cid, "You are currently in a fight.")
elseif isKnight(cid)
doPlayerSendCancel(cid, "You can pass, you are a Knight.")
elseif(getPlayerMoney(cid) < money) then
doPlayerSendCancel(cid, "You do not have enough money.")
else
doPlayerRemoveMoney(cid, money)
doTeleportThing(cid, newP)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doPlayerSendCancel(cid, MESSAGE_INFO_DESCR, "You can't teleport there.")
end
return true
end