Jump to content

[HELP] createColRectangle


ViRuZGamiing

Recommended Posts

Posted

Hello,

How does createColRectangle work?

I want to create a ColRectangle from 2 points;

-1942.0435791016, 253.55065917969, 35.46875

-1964.8684082031, 308.1748046875, 35.473926544189

But how?

Thanks in advance!

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

Posted

if you want to make it from point1 to pint2

https://wiki.multitheftauto.com/wiki/CreateColPolygon

http://en.wikipedia.org/wiki/Polygon

if you wanna make a cube or rectangel in point1 and point2

https://wiki.multitheftauto.com/wiki/CreateColRectangle

also you can add in the code :

"setDevelopmentMode(true)"

and then in chatBox wirte "/showcol 1" then you will see the ColShape ingame

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted

In order to calculate the width and height to use with createColRectangle, you need to subtract the x and y coordinates of your points from each other like this:

width = math.abs(x1-x2) 
height = math.abs(y1-y2) 

Posted
In order to calculate the width and height to use with createColRectangle, you need to subtract the x and y coordinates of your points from each other like this:
width = math.abs(x1-x2) 
height = math.abs(y1-y2) 

Ok. but if i wanna make it from Point1 to Point2 : where Point1 is with 45 degree rotation from Point2. It's impossible to do it with Rectangel.

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

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