Kod PHP:
function onSay(cid, words, param, channel)
local efekt = 10 ---- ustawiasz efekt przy tp
local exh = 25200 --- Co ile sekund mozna uzywaz
local storage = 1429 ---- zostaw
rd = math.random(1, 3) ---- Zostaw
local tp1 = {x=96, y=96, z=9} --- Pozycja gdzie na teleportowac
local tp2 = {x=96, y=94, z=9} --- to samo
local tp3 = {x=84, y=98, z=9} --- to samo
if(getPlayerStorageValue(cid,storage) <= os.time()) and getPlayerLevel(cid) >= 27 then
doSendMagicEffect(getPlayerPosition(cid), efekt)
setPlayerStorageValue(cid,storage,os.time()+exh)
if rd == 1 then
doTeleportThing(cid,tp1)
elseif rd == 2 then
doTeleportThing(cid,tp2)
elseif rd == 3 then
doTeleportThing(cid,tp3)
else
return doPlayerSendCancel(cid, 'EN. / PL.')
end
return true
end
end
Kod PHP:
<talkaction words="/lt" event="script" value="lt.lua"/>
Ale gdy GODem użyje czaru, to tylko wychodzi: "XXX says: /lt"
Zakładki