Code: Select all
---@type Plugin
local plugin = ...
plugin.name = 'Infmag'
plugin.author = 'LOL'
plugin.description = 'The holy grail'
function minigun()
end
plugin.commands["/infmag"] = {
info = "practice mode",
canCall = function(ply) return ply.isAdmin end,
call = function(ply, man, args)
assert(man, "Not spawned in.")
local itm = items.create(itemTypes[3], man.pos, orientations.s)
if itm then
man:mountItem(itm,0)
itm.data.infMag = true
end
end,
}
plugin:addHook('Logic', function()
for _, itm in ipairs(items.getAll()) do
if itm.data.infMag then
itm.bullets = 255
end
end
end)