Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks and Convars #153

Open
dfsss1 opened this issue Jun 15, 2020 · 4 comments
Open

Hooks and Convars #153

dfsss1 opened this issue Jun 15, 2020 · 4 comments

Comments

@dfsss1
Copy link

dfsss1 commented Jun 15, 2020

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.!

@Zulbem
Copy link
Contributor

Zulbem commented Jun 16, 2020

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)

@ceifa
Copy link
Contributor

ceifa commented Aug 23, 2020

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

mapsettings/deathrun_atomic_warfare.lua:

RunConsoleCommand("deathrun_round_limit", 20)

@SoflyTtv
Copy link

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

@ceifa
Copy link
Contributor

ceifa commented Feb 11, 2021

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

In gamemode/mapsettings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants