Jump to content

attempt to call global 'estaPertoActivaMines' (a nil value)


DarkLink

Recommended Posts

Guys I have problem here with timer :S

Tryed setTimer(estaPertoActivaMines, 1000,0) , no error but didnt saw the mines :S

Thanks, I am getting a bit tired, I always have problems, cant write something and put it work on 1st time :S

  
setTimer(estaPertoActivaMines(),1000,0) 
  
  
  
function estaPertoActivaMines() 
    local player = getLocalPlayer()  
    if(getPedOccupiedVehicle(player) ~= false) then 
        local vehicle = getPedOccupiedVehicle(player) 
        if(getElementData(vehicle, 'lighton', false) == true) then 
            for i, v in ipairs(getElementsByType('object')) do 
                local x, y, z = getElementPosition(getLocalPlayer()) 
                local x1, y1, z1 = getElementPosition(v) 
                if getElementModel(v) == 3053 then 
                    if(getDistanceBetweenPoints3D ( x, y, z, x1, y1, z1 ) <= -- s8) --> then 
                        setElementDimension(v,0) 
                    end 
                setObjectStatic(v, true) 
                end 
  
  
            end 
        end 
    end 
         
end 
  

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...