Garry's Mod

Garry's Mod

Melonbomber
Elotero 2014 年 12 月 17 日 下午 1:56
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?
< >
正在显示第 1 - 1 条,共 1 条留言
jenwalter666 2017 年 12 月 24 日 下午 3:14 
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.
最后由 jenwalter666 编辑于; 2017 年 12 月 24 日 下午 5:44
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50