Jump to content

Help createColRectangle


iPrestege

Recommended Posts

There's no need for a server side script.

addEventHandler ( "onClientRender", getRootElement(), 
    function ( ) 
        if guiGetVisible ( GUIEditor.label[9] ) then 
            local team = getPlayerTeam ( localPlayer ) 
            local teamName = ( team and getTeamName ( team ) or "" ) 
            guiSetText ( GUIEditor.label[9], "Team: " .. teamName ) 
        end 
    end 
) 

Link to comment
There's no need for a server side script.
addEventHandler ( "onClientRender", getRootElement(), 
    function ( ) 
        if guiGetVisible ( GUIEditor.label[9] ) then 
            local team = getPlayerTeam ( localPlayer ) 
            local teamName = ( team and getTeamName ( team ) or "" ) 
            guiSetText ( GUIEditor.label[9], "Team: " .. teamName ) 
        end 
    end 
) 

thanks it works good now! :) (:

Link to comment
Well, if you want to make a script which calculates the width and height from two pair of positions ( x and y ), you can try that math calculation.
  
width, height = ( x2 - x1 ), ( y2 - y1 ) 
ColShape = createColRectangle (-1947.08, -1796.138, width, height )  
  
addEventHandler( "onClientColShapeHit", ColShape, 
    function ( thePlayer ) 
        if ( thePlayer == localPlayer ) then 
             bindKey (  "F1", "down", open ) 
  
        end 
    end 
) 
  
addEventHandler( "onClientColShapeLeave", ColShape, 
    function ( thePlayer ) 
        if ( thePlayer == localPlayer ) then 
            unbindKey (  "F1", "down", open ) 
        end 
    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...