MRXBBC Posted October 5, 2019 Share Posted October 5, 2019 (edited) galera tem algum limite para usar o set timer ? pq eu n to conseguindo colocar tres vezes eu quero fazer que depois que faça o primeiro settimer ele demore mais 30 segundos pra fechar o portão function comandohacker (source) if isElementWithinMarker (source, hackear ) then setElementPosition ( lojasair1, 834.66760, 7.45359, 1010) setElementPosition ( hackear, 822.74316, -0.47490, 1010) outputChatBox("#000000[#00FF00 Prisao System #000000] -#00FF7F Atenção todas as Unidades !!",root,255,255,255,true) outputChatBox("#000000[#00FF00 Prisao System #000000] -#00FF7F O Hacker [#FF0000 " .. getPlayerName(source) .. " #00FF7F]#00FF7F está Invadindo o Prisao System de #00FF00Los Santos #00FF7F!!",root,255,255,255,true) outputChatBox ('#FF0000- Fazendo upload do virus... Aguarde 30seg...',source,255,255,255,true) setPedAnimation(source, "CASINO", "Slot_bet_01", 30000, true, false, false, false) setPedRotation(source,270 ) setPedAnimation( ped, "SHOP", "SHP_Rob_HandsUp") triggerClientEvent ( root, "roubar", root) setElementVisibleTo ( blipalarme, root, true ) setTimer ( function() outputChatBox ('#FF0000- Upload do Virus Finalizado com Sucesso... Portao Sera aberto!',source,255,255,255,true) moveObject(portaointer, 4000, -487.599609375,-514, 19.89999961853) moveObject(portaoexter, 4000, -487.60000610352,-524.29998779297,19.89999961853) setElementPosition(dinheiro1,2192.26684, 1625.1552, 1000.8) setElementPosition ( lojasair1, 2163.7546, 1618.1488, 1000.9724) setElementInterior ( hackear, 1) setPedAnimation(ped,false) setElementPosition ( ped, 2186.8, 1619.1047, 999.97656) pos = 0 end, 30000, 1 ) setTimer ( function() outputChatBox ('#FF0000- Portao Fechado!',source,255,255,255,true) moveObject(portaointer, 4000, -487.599609375,-514, 27.89999961853) moveObject(portaoexter, 4000, -487.599609375,-524.2998046875,27.89999961853) end, 30000, 1 ) setTimer ( function() setElementVisibleTo ( blipalarme, root, false ) setElementPosition( hackear, 2194.3000488281, 1623.1999511719, 999.1) outputChatBox("#000000[#00FF00 Prisao System #000000] -#00FF7F O Prisao System se recuperou do ultimo ataque Hacker",root,255,255,255,true) end, 1000000, 1 ) end end addCommandHandler ( "hackear", comandohacker ) Edited October 5, 2019 by MRXBBC Link to comment
Other Languages Moderators Lord Henry Posted October 5, 2019 Other Languages Moderators Share Posted October 5, 2019 Os dois primeiros timers estão executando ao mesmo tempo (30 segundos depois). Coloque um dentro do outro, assim o timer vai iniciar só depois que o outro for executado. 1 Link to comment
MRXBBC Posted October 5, 2019 Author Share Posted October 5, 2019 1 minute ago, Lord Henry said: Os dois primeiros timers estão executando ao mesmo tempo (30 segundos depois). Coloque um dentro do outro, assim o timer vai iniciar só depois que o outro for executado. function comandohacker (source) if isElementWithinMarker (source, hackear ) then setElementPosition ( lojasair1, 834.66760, 7.45359, 1010) setElementPosition ( hackear, 822.74316, -0.47490, 1010) outputChatBox("#000000[#00FF00 Prisao System #000000] -#00FF7F Atenção todas as Unidades !!",root,255,255,255,true) outputChatBox("#000000[#00FF00 Prisao System #000000] -#00FF7F O Hacker [#FF0000 " .. getPlayerName(source) .. " #00FF7F]#00FF7F está Invadindo o Prisao System de #00FF00Los Santos #00FF7F!!",root,255,255,255,true) outputChatBox ('#FF0000- Fazendo upload do virus... Aguarde 30seg...',source,255,255,255,true) setPedAnimation(source, "CASINO", "Slot_bet_01", 30000, true, false, false, false) setPedRotation(source,270 ) setPedAnimation( ped, "SHOP", "SHP_Rob_HandsUp") triggerClientEvent ( root, "roubar", root) setElementVisibleTo ( blipalarme, root, true ) setTimer ( function() outputChatBox ('#FF0000- Upload do Virus Finalizado com Sucesso... Portao Sera aberto!',source,255,255,255,true) moveObject(portaointer, 4000, -487.599609375,-514, 19.89999961853) moveObject(portaoexter, 4000, -487.60000610352,-524.29998779297,19.89999961853) setElementPosition(dinheiro1,2192.26684, 1625.1552, 1000.8) setElementPosition ( lojasair1, 2163.7546, 1618.1488, 1000.9724) setElementInterior ( hackear, 1) setPedAnimation(ped,false) setElementPosition ( ped, 2186.8, 1619.1047, 999.97656) setTimer ( function() outputChatBox ('#FF0000- Portao Fechado!',source,255,255,255,true) moveObject(portaointer, 4000, -487.599609375,-514, 27.89999961853) moveObject(portaoexter, 4000, -487.599609375,-524.2998046875,27.89999961853) end, 30000, 1 ) end, 30000, 1 ) desta forma? Link to comment
Other Languages Moderators Lord Henry Posted October 5, 2019 Other Languages Moderators Share Posted October 5, 2019 Seria interessante você corrigir a indentação. 1 Link to comment
MRXBBC Posted October 5, 2019 Author Share Posted October 5, 2019 2 minutes ago, Lord Henry said: Seria interessante você corrigir a indentação. Sim, irei já fazer isso, só estava querendo ver se está certo, muito obrigado 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