Jump to content

setTimer for Element


Recommended Posts

Hello, today I made this script to be like a kind of mission for my dayz server. But over time I noticed that starts bugar time.

Is there any way to run the X function and only after it has executed count like 15 minutes and disable the function? Like the code below to put this but my code is always crazy after a while, no longer follows the set time. Could review my code and see if I did something wrong? I thank the community for being so helpful!

forgiveness for the English, I'm Brazilian!

my code:

-- MISSAO 1 
function m72Go (thePlayer) 
   outputChatBox ( "#FF0000:#FFFFFF Roube os equipamentos! (checkpoint) (#26e30015 Minutos#ffffff)", everybody,255, 255, 255, true) 
end 
setTimer(m72Go,300000,0) -- start function 
  
function m72Fim (thePlayer) 
     destroyElement(blip72) 
     destroyElement(tent72) 
     destroyElement(marka72) 
     outputChatBox ( "#FF0000:#FFFFFF Missão foi finalizada!", everybody,255, 255, 255, true) 
end 
setTimer(m72Fim,420000,0) -- finish function 
  
-- [ TENT ] 
function tentadayzm72(thePlayer) 
local x, y, z = 61.878128051758,400.298828125,10.41711139679  
blip72 = createBlip(61.878128051758,400.298828125,10.41711139679, 5) 
marka72 = createMarker(61.878128051758,400.298828125,10.41711139679, "checkpoint", 5, 100, 255, 100, 100) 
tent72 = createObject(964, x, y, z - 1) 
setObjectScale(tent72, 0.6) 
tentCol = createColSphere(x + 5, y, z, 4) 
attachElements(tentCol, tent72, 0, 0, 0) 
setElementData(tentCol, "parent", tent72) 
setElementData(tent72, "parent", tentCol) 
setElementData(tentCol, "tent72", true) 
setElementData(tentCol, "vehicle", true) 
setElementData(tentCol, "MAX_Slots", 0) 
setElementData(tentCol, "PP-19 Mag", 10) 
setElementData(tentCol, "PP-19", 10) 
setElementData(tentCol, "UMP-45 Mag", 10) 
setElementData(tentCol, "UMP-45", 10) 
setElementData(tentCol, "M9 SD Mag", 10) 
setElementData(tentCol, "M9 SD", 10) 
setElementData(tentCol, "Glock Mag", 10) 
setElementData(tentCol, "Glock", 10) 
setElementData(tentCol, "Mochila Extra Grande", 10) 
end 
setTimer(tentadayzm72,300000,0) -- start with function spawn object with itens.. 
  
  
  
  
      
      

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...