Jump to content

Why my streamer dosen't work (?).


coolman

Recommended Posts

Hey,

I have been trying to find a solution to fix that problem and I can't. Maybe you know.

function checkStreamIn() 
        local x, y, z = getElementPosition(  getLocalPlayer() ) 
        local playerdimension = getElementDimension (  getLocalPlayer() ) 
         
        streamdistance = 5   
     
        for key, this in pairs( getElementsByType( "vehicle" ) ) do 
            local vx, vy, vz = getElementPosition( this ) 
             
            setElementStreamable ( this, true ) 
             
            if getDistanceBetweenPoints3D( vx, vy, vz, x, y, z ) < streamdistance then 
                setElementStreamable ( this, true ) 
            else 
                success = setElementStreamable ( this, false ) 
            end 
        end 
  
end 
setTimer(checkStreamIn, 1000, 0) 

success return always TRUE and elements are still visible.

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