Forum

> > CS2D > Scripts > Damage Factor for each map
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Damage Factor for each map

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Damage Factor for each map

MethodMan
User Off Offline

Zitieren
Where is the error? Can anyone fix?

1
2
3
4
addhook("startround","damagefactor")
function damagefactor(id)
	parse("mp_damagefactor 999")
end

alt Re: Damage Factor for each map

DC
Admin Off Offline

Zitieren
CS2D supports map specific settings out of the box! This means you don't have to write a single line of Lua to do this.

Just open the file sys/mapcycle.cfg and add a line which looks like:
1
mapname { mp_damagefactor 999 }

Example:
1
2
de_dust { mp_damagefactor X }
de_aztec { mp_damagefactor 123 }

The commands associated with maps in mapcycle.cfg are ALWAYS executed when a map is loaded. It does not matter when/how it is loaded. So you don't have to use the map cycle feature at all to make this work.

alt ok

Ajmin
User Off Offline

Zitieren
ok add that lua in the top of server.lua.
make sure that the dofile of hc admin script is in bottom.
(it should be in down of ur script)
it works
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht