Skrypty & Kody !t ma?a modyfikacja help

Status
Zamknięty.

moonsmage123

User
Zarejestrowany
Dołączył
Sierpień 27, 2009
Posty
22
Liczba reakcji
0
Witam potrzebowa? bym zmodyfikowa? ten skrypt ?eby nie dzia?a? on w miejscach gdzie jest No logout i gdzie jest PZ. Poniewa? je?eli w??cz? event ludzie mog? sie za pomoc? tej komendy teleportowa? do dp i wyjsc z niego a tak byc nie powinno.

[LUA]
function onSay(cid, words, param, channel)
if(not getTileInfo(getCreaturePosition(cid)).protection and getPlayerAccess(cid) <= 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can use it only in Protection Zone.")
return true
end
local townID = tonumber(param)
if(not townID or townID < 1 or townID > 6) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town ID must be between 1 and 6.")
return true
end

local pos = getTownTemplePosition(townID)
local tmp = getThingPosition(cid)

if(doTeleportThing(cid, pos, true) and not isPlayerGhost(tid)) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end

return true
end[/LUA]
 
Odp: !t ma?a modyfikacja help

[LUA]function onSay(cid, words, param, channel)
local townID = tonumber(param)
if(not townID or townID < 1 or townID > 6) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town ID must be between 1 and 6.")
return true
end

local pos = getTownTemplePosition(townID)
local tmp = getThingPosition(cid)

if(doTeleportThing(cid, pos, true) and not isPlayerGhost(tid)) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end

return true
end[/LUA]

Obczaj to, bo za bardzo nie wiem o co chodzi.
 
Status
Zamknięty.
Back
Do góry