if getAmmoPerClip(weaponID) == "disabled" then --If weapon is not allowed
outputChatBox("[MAKEAMMO] Invalid Weapon Name/ID. Type /gunlist or hit F4 to open Weapon Creator.", thePlayer, 255, 0, 0)
return
elseif getAmmoPerClip(weaponID) == tostring(0) then-- if weapon doesn't need ammo to work
outputChatBox("[MAKEAMMO] This weapon doesn't use ammo.", thePlayer, 255, 0, 0)
return
else
end
local logged = getElementData(targetPlayer, "loggedin")
local hiddenAdmin = getElementData(thePlayer, "hiddenadmin")
if (logged==0) then
outputChatBox("Player is not logged in.", thePlayer, 255, 0, 0)
elseif (logged==1) then
if ammo == -1 then -- if full ammopack
ammo = getAmmoPerClip(weaponID)
end