From 0073df564aa64c6fa6ea9ed25529546b4acf1ec3 Mon Sep 17 00:00:00 2001 From: Jacob Paulin Date: Sat, 3 Aug 2024 10:48:00 -0400 Subject: [PATCH] chore(PHYSICS/DoesRopeExist): Updates based on review Changed C# example to use native rope creation instead of wrapper --- PHYSICS/DoesRopeExist.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PHYSICS/DoesRopeExist.md b/PHYSICS/DoesRopeExist.md index 4004c0b9e..362efe241 100644 --- a/PHYSICS/DoesRopeExist.md +++ b/PHYSICS/DoesRopeExist.md @@ -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); } ``` \ No newline at end of file