iPrestege Posted January 15, 2013 Posted January 15, 2013 (edited) Hello, how can I calculate the area's Height and width? Edited January 15, 2013 by Guest
Castillo Posted January 15, 2013 Posted January 15, 2013 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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted January 15, 2013 Author Posted January 15, 2013 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! (:
Castillo Posted January 15, 2013 Posted January 15, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted January 15, 2013 Author Posted January 15, 2013 Hello, how can I calculate the area's Height and width?
Castillo Posted January 15, 2013 Posted January 15, 2013 You could try with this calculation: width, height = ( x2 - x1 ), ( y2 - y1 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted January 15, 2013 Author Posted January 15, 2013 You could try with this calculation: width, height = ( x2 - x1 ), ( y2 - y1 ) What does this mean?Can you explain more? I did not understand what you mean?
Castillo Posted January 15, 2013 Posted January 15, 2013 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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted January 15, 2013 Author Posted January 15, 2013 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 )
Castillo Posted January 15, 2013 Posted January 15, 2013 I guess you don't want to do what I said, so, you just set the height and width to what you want, until it fits what you need. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted January 15, 2013 Author Posted January 15, 2013 I do not understand that I wanted to do Can you put an example?
Castillo Posted January 15, 2013 Posted January 15, 2013 ColShape = createColRectangle (-1947.08, -1796.138, 100, 100 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted January 15, 2013 Author Posted January 15, 2013 ColShape = createColRectangle (-1947.08, -1796.138, 100, 100 ) Thank you ,you did not understand what I mean!
Castillo Posted January 15, 2013 Posted January 15, 2013 Well, next time you should ask what is width and height, not how to calculate it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted January 15, 2013 Author Posted January 15, 2013 Well, next time you should ask what is width and height, not how to calculate it. I know height and width! But how do I calculate it?but thanks .
myonlake Posted January 16, 2013 Posted January 16, 2013 What do you even want to calculate? There's nothing to calculate (unless you want the area, circuit or volume; which are taught in normal schools; simple put, Pythagorean theorem). createColRectangle(x, y, width, height) If I helped you, please click the like button on the right Thanks!
iPrestege Posted January 16, 2013 Author Posted January 16, 2013 What do you even want to calculate? There's nothing to calculate (unless you want the area, circuit or volume; which are taught in normal schools; simple put, Pythagorean theorem). createColRectangle(x, y, width, height) Thanks!
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