Garry's Mod

Garry's Mod

Melonbomber
Elotero Dec 17, 2014 @ 1:56pm
How to change max amount of upgrades?
I want to change the maximum so that you can have up to 100 of the 3 base upgrades (power, speed, and bombs.) In which file of the gamemode can I access this?
< >
Showing 1-1 of 1 comments
jenwalter666 Dec 24, 2017 @ 3:14pm 
hi, elotero.
although this discussion is very old, i want to answer your question.

make sure you have the non-steam version of this addon here.

https://github.com/MechanicalMind/melonbomber

or you can use gmad.bat to convert the file from an addon to raw form.

also make sure you have notepad++.

now, in garrysmod/addons/<melonbomber folder name>/gamemode, you should find a lua file named sv_upgrades.lua.

edit this using notepad++.

find this piece of code in the file:

function PlayerMeta:SetMaxBombs(amo)
self.MaxBombs = math.Clamp(amo or 1, 1, 9)
self:NetworkUpgrades()
end

this piece of code manages the maximum number of bombs a player can have.

in the line
self.MaxBombs = math.Clamp(amo or 1, 1, 9)
change the digit "9" to another number, like "100" in your case.
do this for SetRunningBoots, and SetBombPower.
save, and launch your own game with the melonbomber gamemode enabled.
test if this limit works.
Last edited by jenwalter666; Dec 24, 2017 @ 5:44pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50