Skip to content

Adding Removing maps

Matt edited this page May 22, 2024 · 2 revisions

Lambda will get the map list by default from the gametype however you can still manipulate the list via the hook LambdaInitializeMapList which is called when Lambda is initialized and/or the gametype changes.

Examples

Adding a map to the list.

hook.Add("LambdaInitializeMapList", "AddMaps", function(maplist)
	table.insert(maplist, "my_special_map")
end)

Removing a map from the list.

-- Removing map from the list.
hook.Add("LambdaInitializeMapList", "RemoveMap", function(maplist)
	table.RemoveByValue(maplist, "dm_powerhouse")
end)

You can do this by creating a simple addon and add the hooks in the autorun/init.lua. This hook is shared and must be setup on client and server.

Clone this wiki locally