Jump to content

Transparency


Memory

Recommended Posts

Hi,

Please, help with code, he doesn't work.

function transparency( ) 
            local fX, fY, fZ = getElementPosition ( source ) 
            for _, pVehicle in ipairs ( getElementsByType 'vehicle' ) do 
                local fVehicleX, fVehicleY, fVehicleZ = getElementPosition ( pVehicle ) 
                local fDistance = getDistanceBetweenPoints3D ( fVehicleX, fVehicleY, fVehicleZ, fX, fY, fZ ) 
                if ( fDistance < 10 ) then 
                setElementAlpha(getPedOccupiedVehicle(source),150) 
        setElementAlpha(source,150) 
        setPlayerNametagShowing(source, false) 
                else 
                setElementAlpha(getPedOccupiedVehicle(source),255) 
        setElementAlpha(source,255) 
        setPlayerNametagShowing(source, true) 
                end 
            end 
    setTimer (transparency,1000,1) 
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...