Forum

> > CS2D > Scripts > "mp_damagefactor 0" on map start up?
Forums overviewCS2D overview Scripts overviewLog in to reply

English "mp_damagefactor 0" on map start up?

2 replies
To the start Previous 1 Next To the start

old "mp_damagefactor 0" on map start up?

8Ball
User Off Offline

Quote
How could I initiate mp_damagefactor 0 on a certain map when it starts up? Do I need a lua (script file included with the map) that will commence when the map is loaded? If so, would someone please make this for me? I want to finish this map asap.

I don't want the Terrorist or Counter-Terrorist to be able to kill each other, basically.

If there's a simpler way to do it, please tell me. I'm really tired at the moment, so I might not be thinking straight, lol. By the way, I can't just set the game-mode to tdm or dm, because I want the map to have a when everyone dies, it's game over touch to it. Thanks in advance.

old Re: "mp_damagefactor 0" on map start up?

MikuAuahDark
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mp_factordamage_NULL={"map1","map2"}	-- Name of the map that you want to make the mp_damagefactor to zero. Separated by comma

local temp=false
addhook("startround","ok")
function ok()
	for n,v in pairs(mp_factordamage_NULL) do
		if game("sv_map")==v then
			parse("mp_damagefactor 0")
			break
		else
			parse("mp_damagefactor 1")
		end
	end
	temp=true
end
if not temp then ok() end
Use code above NOT as lua map, but as server lua(dofile at server.lua)
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview