Paplo Posted August 22, 2013 Share Posted August 22, 2013 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
iPrestege Posted August 22, 2013 Share Posted August 22, 2013 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
Paplo Posted August 22, 2013 Author Share Posted August 22, 2013 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
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