Infinite Ammo?

Hey there,

I am working on adding an infinite ammo script to my server, making everyone have unlimited ammo.

Anybody know any easy methods?

The methods are:

  1. Perfect, but unreasonable: Don’t actually remove the ammo from the SWEP
  2. Imperfect, but reasonable: SetClip1() and SetClip2 to max values in a timer.

Ah right, any like autorun code I could implement?

Also, perfect person to reply, is it possible to buff the lightsaber lightning? As a matter of fact I am running a StarwarsRP server. :slight_smile:

This isn’t a make me forum.

As for Lightsabers, you can always extract the Lua and edit it to your liking. Make sure not to redistribute edited copies, edited files will be automatically set to clients.

Ah right, thanks for your support! :slight_smile:

[lua]
function GIBAMMO()
for k, v in pairs(player.GetAll()) do
if v:IsPlayer() && !v:IsBot() then
local wep = v:GetActiveWeapon()
if IsValid(wep) then
wep:SetClip1(100)
end
end
end
end
hook.Add(“Think”, “PLSIBEGU”, GIBAMMO)
[/lua]

Untested.

Alternatively, you can use

GM/EntityFireBullets instead of Think hook for efficiency.