• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Problem with movements script

Delvire

°£°
Joined
Feb 24, 2008
Messages
236
Reaction score
9
Hello users... well, I'm begginer in LUA, and always, when I use the getPlayerStorageValue function I got bugs...

could anyone tell me what's wrong?


function onStepIn(cid, item, frompos, item2, topos)


playerpos = getPlayerPosition(cid)
novapos = {x=1040, y=264, z=14}
rejeita = {x=994, y=296, z=13}

if item.uid == 8001 and getPlayerStorageValue(cid, 8002) = -1 and getPlayerLevel(cid) >= 130 then
getThingfromPos(playerpos)
doSendMagicEffect(playerpos,5)
doTeleportThing(cid,novapos)
doSendMagicEffect(novapos,10)
else

doTeleportThing(cid,rejeita)
end
end
end
 
Hello users... well, I'm begginer in LUA, and always, when I use the getPlayerStorageValue function I got bugs...

could anyone tell me what's wrong?
Code:
function onStepIn(cid, item, frompos, item2, topos)


playerpos = getPlayerPosition(cid)
novapos = {x=1040, y=264, z=14}
rejeita = {x=994, y=296, z=13}

if item.uid == 8001 and getPlayerStorageValue(cid, 8002) = -1 and getPlayerLevel(cid) >= 130 then
getThingfromPos(playerpos)
doSendMagicEffect(playerpos,5)
doTeleportThing(cid,novapos)
doSendMagicEffect(novapos,10)
else

doTeleportThing(cid,rejeita)
end
end
end
replace for this
Code:
function onStepIn(cid, item, frompos, item2, topos)


local playerpos = getPlayerPosition(cid)
local novapos = {x=1040, y=264, z=14}
local rejeita = {x=994, y=296, z=13}

if (item.uid == 8001) and (getPlayerStorageValue(cid, 8002) = -1) and (getPlayerLevel(cid) >= 130) then
getThingfromPos(playerpos)
doSendMagicEffect(playerpos,5)
doTeleportThing(cid,novapos)
doSendMagicEffect(novapos,10)
else
doTeleportThing(cid,rejeita)
end
end
end
 
Back
Top