Skip to content

Commit

Permalink
added customizable delay for rapid fire.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keramis committed Mar 24, 2022
1 parent 317b330 commit 3612f9c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions V.5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,7 @@ end)
menu.divider(pvphelp, "Legit Rapid Fire")

LegitRapidFire = false
LegitRapidMS = 100

menuToggle(pvphelp, "Legit Rapid Fire (fast-switch)", {"legitrapidfire"}, "Quickly switches to grenades and back to your weapon after you shot something. Useful with Sniper, RPG, Grenade Launcher.", function(on)
local localped = getLocalPed()
Expand All @@ -2074,9 +2075,8 @@ menuToggle(pvphelp, "Legit Rapid Fire (fast-switch)", {"legitrapidfire"}, "Quick
local currentWP = memory.read_int(currentWpMem)
memory.free(currentWpMem)
WEAPON.SET_CURRENT_PED_WEAPON(localped, 2481070269, true) --2481070269 is grenade
wait(10)
wait(LegitRapidMS)
WEAPON.SET_CURRENT_PED_WEAPON(localped, currentWP, true)
wait()
end
wait()
end
Expand All @@ -2086,6 +2086,10 @@ menuToggle(pvphelp, "Legit Rapid Fire (fast-switch)", {"legitrapidfire"}, "Quick
end
end)

menu.slider(pvphelp, "Legit Rapid Fire Delay (ms)", {"legitrapiddelay"}, "The delay that it takes to switch to grenade and back to the weapon.", 1, 1000, 100, 50, function (value)
LegitRapidMS = value
end)

-----------------------------------------------------------------------------------------------------------------------------------

local debugFeats = menu.list(menuroot, "Debug Features", {}, "")
Expand Down

0 comments on commit 3612f9c

Please sign in to comment.