• 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 this script

Obsdark

Member
Joined
Sep 25, 2011
Messages
213
Reaction score
9
Hey Guys

I have a problem with this script, it supose to be a simple Lever that when is triggered, create an apple in some specific coordinates, and when is un-triggereded, the script delete the apple from that coordinates.

now, the is no problem when he must create it, but it doesn't work when he must remove it, can you help me to fix this problem?

LUA:
local vars = {x=3013,y=3079,z=8}
local vars2 = {x=3013,y=3079,z=8,stackpos=255}
function onUse(cid, item, frompos, itemEx, topos)
    if item.itemid == 1945 and item.uid == 9898 then
        doCreateItem(2674, 1, vars)
        doPlayerSendTextMessage(cid,21,"el sistema ha sido activado")
        doTransformItem(item.uid, item.itemid + 1)    
    elseif item.itemid == 1946 and item.uid == 9898 then
        doRemoveItem(vars2, 2674, 1)
        doPlayerSendTextMessage(cid,21,"¡Sistema Desactivado!")
        doTransformItem(item.uid, item.itemid - 1)
    else 
        doPlayerSendCancel(cid,"Error !") 
    end
    return true
end

Atte
¡And Gratefull Since Now!


-Obsdark-

PS: I Give Rep++
 
Last edited by a moderator:
Back
Top