Jump to content

Need help.


Recommended Posts

addEventHandler ( "onClientRender", root, 
    function () 
        local x, y, z = getElementPosition ( getLocalPlayer() ); 
        local dim = getElementDimension ( getLocalPlayer() ); 
         
        for key, player in ipairs ( getElementsByType ( "player" ) ) do 
            if ( ( isElement ( player ) ) and  ( getElementDimension ( player ) == dim ) ) then 
                local px, py, pz = getElementPosition ( player ); 
                local distance = getDistanceBetweenPoints3D ( x, y, z, px, py, pz ); 
                if ( isElementOnScreen ( player ) and ( distance < 20 ) ) then 
                 
                end 
            end 
        end 
    end 
); 

There you go, a small start. :)

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