magicplayerc Posted April 1, 2019 Share Posted April 1, 2019 (edited) function coletar01(source) if isElementWithinMarker(source, coletardroga1) then setElementVisibleTo(coletardroga1, source, false) setPlayerWantedLevel(source, 6) toggleAllControls (source, false) setElementPosition(source,-1077.54639, -1637.18079, 76.36719) outputChatBox("#00FA9A[maconha] #ffffffvoce esta coletando as folhas de maconha aguarde", source, 255, 255, 255, true) setPedAnimation(source,"bomber", "BOM_Plant_Loop", 30000, true, false, false, false) setTimer( function () destroyElement(arvore1[source]) outputChatBox("#00FA9A[maconha] #ffffffVoce coletou a primeira remessa de folhas #00fa9a60/60 ", source, 255, 255, 255, true) toggleAllControls (source, true) end, 30000, 1) setTimer( function () triggerClientEvent(source, "doShowProgressBarf", source) triggerEvent(eventorestart, root) end, 1000, 1) end end addCommandHandler("colher1",coletar01) Edited April 1, 2019 by magicplayerc Link to comment
#DaNiLiN Posted April 1, 2019 Share Posted April 1, 2019 Tente arvore1 = {} function coletar01(source) if isElementWithinMarker(source, coletardroga1) then arvore1[source] = createObject ( 2332, x, y, z, rx, ry, rz ) -- NÃO PODE TER "LOCAL ATRÁS DA LINHA POIS SE VOCÊ DESTRUIR EM OUTRAS FUNÇÕES VAI DAR ERRO setElementVisibleTo(coletardroga1, source, false) setPlayerWantedLevel(source, 6) toggleAllControls (source, false) setElementPosition(source,-1077.54639, -1637.18079, 76.36719) setPedAnimation(source,"bomber", "BOM_Plant_Loop", 30000, true, false, false, false) outputChatBox("#00FA9A[maconha] #ffffffvoce esta coletando as folhas de maconha aguarde", source, 255, 255, 255, true) setTimer( function () triggerClientEvent(source, "doShowProgressBarf", source) triggerEvent(eventorestart, root) end, 1000, 1) setTimer( function () destroyElement(arvore1[source]) outputChatBox("#00FA9A[maconha] #ffffffVoce coletou a primeira remessa de folhas #00fa9a60/60 ", source, 255, 255, 255, true) toggleAllControls (source, true) end, 30000, 1) end end addCommandHandler("colher1",coletar01) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now