Okey, sorry.Give that ground an actionId or uniqueId.
onStepIn()
doSendMagicEffect({x, y, z}, 55, false) -- or true if you want
end
If you want the full script, post in Requests board.
function onStepIn(cid.pos)
if isPlayer(cid) then
doSendMagicEffect({x=1091, y=1053, z=7}, 55, false)
end
data/movements/scripts/strzalki_informujace.lua:1: ')' expected near '.'
I do not understandOpen another onStepIn() script in Movements and copy the function onStepIn() line if you forget the parameters.
Using cid.pos there is incorrect.
replace the . with ,
function onStepIn(cid, pos)
if isPlayer(cid) then
doSendMagicEffect({x=1070, y=1047, z=7}, 55, false)
doSendMagicEffect({x=1071, y=1047, z=7}, 55, false)
end
end
Code:function onStepIn(cid, pos) if isPlayer(cid) then doSendMagicEffect({x=1070, y=1047, z=7}, 55, false) doSendMagicEffect({x=1071, y=1047, z=7}, 55, false) end end
Ok. How to block further execution of the script? Its looped, is to show what once.
@edit worked
function onStepIn(cid, pos)
if isPlayer(cid) then
if getPlayerStorageValue(cid, 20002) == -1 then
doSendMagicEffect({x=1070, y=1047, z=7}, 55, false)
doSendMagicEffect({x=1071, y=1047, z=7}, 55, false)
setPlayerStorageValue(cid, 20002, 1)
else
return false
end
end
return true
end
but that will only stop it for 1 player and it will never make it start again for that player, although it should really check if an effect is active.. i'll be honest I don't feel like writing it heheYou can use storage values to stop code from executing multiple times.
Code:function onStepIn(cid, pos) if isPlayer(cid) then if getPlayerStorageValue(cid, 20002) == -1 then doSendMagicEffect({x=1070, y=1047, z=7}, 55, false) doSendMagicEffect({x=1071, y=1047, z=7}, 55, false) setPlayerStorageValue(cid, 20002, 1) else return false end end return true end
local effectPos = {
{x=1070, y=1047, z=7},
{x=1071, y=1047, z=7}
}
local exhaust = true
local time_ = 30
function resetExhaust()
exhaust = true
end
function onStepIn(cid, pos)
if isPlayer(cid) then
if exhaust then
exhaust = false
for i = 1, #effectPos do
doSendMagicEffect(effectPos[i], 55, false)
end
addEvent(resetExhaust, time_ * 1000)
end
return true
end