local isHudVisible = false Citizen.CreateThread(function() while true do local playerPed = PlayerPedId() if IsPedReloading(playerPed) then if isHudVisible then isHudVisible = false SendNUIMessage({ action = "hide" }) end else if IsControlPressed(0, 25) and IsPedArmed(playerPed, 4) then local _, weaponHash = GetCurrentPedWeapon(playerPed) local _, ammo = GetAmmoInClip(playerPed, weaponHash) local maxammo = GetAmmoInPedWeapon(playerPed, weaponHash) if not isHudVisible then isHudVisible = true SendNUIMessage({ action = "show", ammo = ammo, maxammo = maxammo - ammo }) end if IsControlPressed(0, 24) then SendNUIMessage({ action = "show", ammo = ammo, maxammo = maxammo - ammo }) end else if isHudVisible then isHudVisible = false SendNUIMessage({ action = "hide" }) end end end Citizen.Wait(20) end end) -- Test Amaçlı Silah Verme Komutu RegisterCommand("giveweapon", function() GiveWeaponToPed(PlayerPedId(), GetHashKey("WEAPON_ASSAULTRIFLE"), 255, false, true) end)