Jump to content

help with changeDim object


Paplo

Recommended Posts

function changeDim ( element ) 
    if element and getElementType( element ) == "object" and getElementModel ( element ) == 6959 then 
         setElementDimension ( element, 50 ) 
    end 
end 
setTimer(changeDim, 1000, 1, source) 

whats wrong ?

Link to comment
function changeDim ( element ) 
    if element and getElementType( element ) == "object" and getElementModel ( element ) == 6959 then 
         setElementDimension ( element, 50 ) 
    end 
end 
setTimer(changeDim, 1000, 1, source) 

whats wrong ?

Try this :

setTimer ( 
    function (      ) 
        for _,element in next,getElementsByType ( 'object' ) do 
            if getElementModel ( element ) == 6959 then 
                 setElementDimension ( element,50 ) 
            end 
        end 
    end,1000,1 
) 

Link to comment
function changeDim ( element ) 
    if element and getElementType( element ) == "object" and getElementModel ( element ) == 6959 then 
         setElementDimension ( element, 50 ) 
    end 
end 
setTimer(changeDim, 1000, 1, source) 

whats wrong ?

Try this :

setTimer ( 
    function (      ) 
        for _,element in next,getElementsByType ( 'object' ) do 
            if getElementModel ( element ) == 6959 then 
                 setElementDimension ( element,50 ) 
            end 
        end 
    end,1000,1 
) 

thank you it work

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