Skip to content
This repository was archived by the owner on Dec 25, 2022. It is now read-only.

Commit 630cca4

Browse files
committed
Ropegun glitching was caused by targeting peds in vehicles
1 parent 5ffa66f commit 630cca4

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Client/Ropes.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,22 +159,19 @@ private static async Task Update()
159159
if (!API.GetEntityPlayerIsFreeAimingAt(playerID, ref target))
160160
return;
161161

162+
if (API.IsEntityAPed(target) && API.IsPedInAnyVehicle(target, false))
163+
target = API.GetVehiclePedIsIn(target, false);
164+
162165
if (API.IsPedInAnyVehicle(player, false))
163166
{
164167
var vehicle = API.GetVehiclePedIsIn(player, false);
165-
if (API.IsControlJustPressed(0, 69))
166-
{
167-
await Delay(500);
168+
if (API.IsControlJustPressed(0, 69)) // vehicle attack
168169
Attach(vehicle, target);
169-
}
170170
}
171171
else
172172
{
173-
if (API.IsControlJustPressed(0, 24))
174-
{
175-
await Delay(500);
173+
if (API.IsControlJustPressed(0, 24)) // attack
176174
Attach(player, target);
177-
}
178175
}
179176
}
180177
}

0 commit comments

Comments
 (0)