Skip to content

Commit

Permalink
chore(PHYSICS/DoesRopeExist): Updates based on review
Browse files Browse the repository at this point in the history
Changed C# example to use native rope creation instead of wrapper
  • Loading branch information
JayPaulinCodes committed Aug 3, 2024
1 parent 2624653 commit 0073df5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions PHYSICS/DoesRopeExist.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ end
```

```cs
using CitizenFX.Core;
using static CitizenFX.Core.Native.API;

// Create a rope and store the reference
Rope rope = World.AddRope(RopeType.ThinMetalWire, new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), 0f, 0f, false);
int handle = rope.Handle;
int unkPtr = 0;
int ropehandle = AddRope(0f, 0f, 0f, 0f, 0f, 0f, 10f, 5, 10f, 0f, 1f, false, false, false, 1f, false, ref unkPtr);

// Check if the rope exists.
if (DoesRopeExist(ref handle))
if (DoesRopeExist(ref ropehandle))
{
// If the rope does exist, delete the rope.
DeleteRope(ref handle);
DeleteRope(ref ropehandle);
}
```

0 comments on commit 0073df5

Please sign in to comment.