Hello,
I created an event and only runs once :S.. I think it is for error (luaAddEvent) Callback parameter should be a function.. ¿This error Stop event?
I paste my code here..
(all is on one file)
Event:
Script:
Thanks for all people
!
I created an event and only runs once :S.. I think it is for error (luaAddEvent) Callback parameter should be a function.. ¿This error Stop event?
I paste my code here..
(all is on one file)
Event:
Code:
function prova(cid)
--Efectes
--FOC
posx = getPlayerPosition(cid).x+1
posy = getPlayerPosition(cid).y
posz = getPlayerPosition(cid).z
coor = {x = posx, y = posy , z = posz}
doSendMagicEffect(coor, 15)
posx = getPlayerPosition(cid).x-1
posy = getPlayerPosition(cid).y
posz = getPlayerPosition(cid).z
coor = {x = posx, y = posy , z = posz}
doSendMagicEffect(coor, 15)
posx = getPlayerPosition(cid).x
posy = getPlayerPosition(cid).y+1
posz = getPlayerPosition(cid).z
coor = {x = posx, y = posy , z = posz}
doSendMagicEffect(coor, 15)
posx = getPlayerPosition(cid).x
posy = getPlayerPosition(cid).y-1
posz = getPlayerPosition(cid).z
coor = {x = posx, y = posy , z = posz}
doSendMagicEffect(coor, 15)
end
Script:
Code:
local control = true
local posx
local posy
local pos7
local coor
function onEquip(cid, item, slot)
if item.itemid == 7385 then
if getPlayerGroupId(cid) == 6 then
[B]local efectes = addEvent(prova(cid),5000)[/B]
else
doPlayerSendTextMessage(cid,21,"You can't")
doCreatureAddHealth(cid, -getCreatureHealth(cid)) --Mort
control = false
end
end
return control
end
Thanks for all people
