Skip to content
This repository was archived by the owner on Mar 28, 2024. It is now read-only.

Commit 86fda11

Browse files
authoredJul 12, 2023
Merge pull request #11 from matheusobf/main
fix of infinite ammo
2 parents a80d538 + 7ddbfa5 commit 86fda11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ end)
137137
CreateThread(function()
138138
while true do
139139
local ped = PlayerPedId()
140-
if IsPedShooting(ped) and (IsControlJustReleased(0, 24) or IsDisabledControlJustReleased(0, 24)) then --Change
140+
if IsPedArmed(ped, 7) == 1 and (IsControlJustReleased(0, 24) or IsDisabledControlJustReleased(0, 24)) or IsPedShooting(ped) and (IsControlJustReleased(0, 24) or IsDisabledControlJustReleased(0, 24)) then
141141
local weapon = GetSelectedPedWeapon(ped)
142142
local ammo = GetAmmoInPedWeapon(ped, weapon)
143143
TriggerServerEvent("weapons:server:UpdateWeaponAmmo", CurrentWeaponData, tonumber(ammo))

0 commit comments

Comments
 (0)
This repository has been archived.