For all who want to see they colshapes.
By the 2D version is a line added to the Z position from player.
Small sphere have per cycle 8 lines bigger more this is for a better performance.
How to use this:
1. Copy the ColShape.dll from folder ColShapeDebug\bin\release to your folder where gt-mp server exe is.
2. Place the ColShapeDebug folder in your resource folder.
3. Add in your meta from your resource with your shape <assembly ref="ColShape.dll" /> and <include resource="ColShapeDebug" />.
4. Add this to your files where the shape create " using ColShape.server; "
5. Create your shape API.shared.create3DColShape(new Vector3(10, 0, 70), new Vector3(15, 5, 75)); and add the Draw(); like in the example.
- <!-- Create with meta generator by SyBozz -->
- <info name="Example" author="SyBozz" type="script" />
- <!-- Include Resources -->
- <include resource="ColShapeDebug" />
- <!-- Assembly -->
- <assembly ref="ColShape.dll" />
- <!-- Server Scripts -->
- <script src="example.cs" type="server" lang="csharp" />
- using GrandTheftMultiplayer.Server.API;
- using GrandTheftMultiplayer.Server.Elements;
- using GrandTheftMultiplayer.Server.Managers;
- using GrandTheftMultiplayer.Shared.Math;
- using ColShape.server;
- class shapes : Script
- public shapes()
- API.onPlayerFinishedDownload += onPlayerFinishedDownloadHandler;
- private static void onPlayerFinishedDownloadHandler(Client player)
- var shape = API.shared.create3DColShape(new Vector3(10, 0, 70), new Vector3(15, 5, 75));
- //API.shared.create3DColShape(new Vector3(10, 0, 70), new Vector3(15, 5, 75)).Draw(); // worked too
There are 4 shape types and it can only draw one for every type at the time
this is the last shape with .Draw();
If you have a big shape please draw only one per time.
FPS can go down to 15 or less when your shapes to big.
When you use .Draw(); before you join you can`t see the shape
for that create the shape after join or restart your resource with command.
This is only for debug and to see where you shape is.