deathrun icon indicating copy to clipboard operation
deathrun copied to clipboard

Hooks and Convars

Open dfsss1 opened this issue 4 years ago • 4 comments

How can i change the amount of rounds of a SPECIFIC map??? Because i want to change the time and the rounds only for a specific map but i don't know how… if anyone help me with that i'be very happy… Thanks btw.!

dfsss1 avatar Jun 15 '20 20:06 dfsss1

just made this, should do the job. Create a file in lua > autorun > server > filename.lua and paste it in there.

local maplimits = { -- Add maps and round limits here
	{
		mapname = "deathrun_example_map",
		maprounds = 2
	},
	{
		mapname = "deathrun_example_map2",
		maprounds = 5
	}
}

hook.Add( "InitPostEntity", "customroundlimits", function()
	local map = tostring( game.GetMap() )
	
	for i=1, #maplimits do
		if map == maplimits[i].mapname then
			RunConsoleCommand( "deathrun_round_limit", maplimits[i].maprounds )
			return
		end
	end
end)

Zulbem avatar Jun 16 '20 23:06 Zulbem

MapSettings do the job. Create the mapsettings directory and your map files, example:

mapsettings/deathrun_atomic_warfare.lua:

RunConsoleCommand("deathrun_round_limit", 20)

ceifa avatar Aug 23 '20 23:08 ceifa

so we make a file in maps or in the gamemode files

SoflyTtv avatar Dec 23 '20 00:12 SoflyTtv

so we make a file in maps or in the gamemode files

In gamemode/mapsettings

ceifa avatar Feb 11 '21 01:02 ceifa