Dandnix Posted July 26, 2022 Share Posted July 26, 2022 ola fiz este script de plantação só que se eu plantar 2 plantas ao mesmo tempo ele fica todo bugado alguém sabe como posso resolver? elseif itemID == 13 then takeItem(player, itemID, quantidade) local x, y, z = getElementPosition(thePlayer) local vasocanabis = createObject(thePlayer,2203, x+1, y, z-1) exports.danger_infobox:addBox(player,"success", "Voce plantou um Pé de canabis!") markercolher = createMarker ( x+1, y, z-1, "cylinder", 1.5, 255, 255, 0, 170 ) setTimer( function () destroyElement(vasocanabis) canabispronta = createObject(2010, x+1, y, z-1, 0, 0, 0) end ,5000,1 ) function colher(player) destroyElement(canabispronta) destroyElement(markercolher) exports.danger_infobox:addBox(player ,"info", "Voce colheu um pe de canabis!") end function key (player) if isElement(canabispronta) then bindKey (player, "e", "down", colher) exports.danger_infobox:addBox(player ,"info", "Use telca E para colher!") end end addEventHandler( "onMarkerHit", markercolher, key) Link to comment
Dandnix Posted July 26, 2022 Author Share Posted July 26, 2022 desculpe sou novo neste site não sei bem mexer aqui elseif itemID == 13 then takeItem(player, itemID, quantidade) local x, y, z = getElementPosition(player) local vasocanabis = createObject(thePlayer,2203, x+1, y, z-1) exports.danger_infobox:addBox(player,"success", "Voce plantou um Pé de canabis!") markercolher = createMarker ( x+1, y, z-1, "cylinder", 1.5, 255, 255, 0, 170 ) setTimer( function () destroyElement(vasocanabis) canabispronta = createObject(2010, x+1, y, z-1, 0, 0, 0) end ,5000,1 ) function colher(player) destroyElement(canabispronta) destroyElement(markercolher) exports.danger_infobox:addBox(player ,"info", "Voce colheu um pe de canabis!") end function key (player) if isElement(canabispronta) then bindKey (player, "e", "down", colher) exports.danger_infobox:addBox(player ,"info", "Use telca E para colher!") end end addEventHandler( "onMarkerHit", markercolher, key) Link to comment
Administrators Tut Posted July 26, 2022 Administrators Share Posted July 26, 2022 Closing this as duplicate. Please see the response to your other thread Link to comment
Recommended Posts