Forum

> > CS2D > Scripts > Number Destroy Buildings
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Number Destroy Buildings

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Number Destroy Buildings

Remulux
User Off Offline

Zitieren
Hello!Do you know how to change the number of buildings that can destroy your team because it is always after the destruction of 5 you can not destroy more how to change.

alt Re: Number Destroy Buildings

EP
User Off Offline

Zitieren
there's no command for changing what user Remulux wants to change. or at least tell me which is it.. apologies accepted √
1× editiert, zuletzt 08.05.13 00:07:50

alt Re: Number Destroy Buildings

Yates
Reviewer Off Offline

Zitieren
Weird.

I thought you could change the limit of buildings one may destroy. Seems as though I am wrong.

My most decent apologies and whatever √

alt Re: Number Destroy Buildings

EP
User Off Offline

Zitieren
no problem, well.. the code should be something like this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
teambuildinglimit = 5

killbuildingscount = {}
for i = 1,32 do
	killbuildingscount[i] = 0
end

addhook("join","_join")
function _join(id)
	killbuildingscount[id] = 0
end

addhook("startround","_startround")
function _startround()
	for i = 1,32 do 
		killbuildingscount[i] = 0
	end
end

addhook("objectkill","_objectkill")
function _objectkill(oid,id)
	local pl = object(oid,"player")
	if pl > 0 and player(pl,"exists") and player(pl,"team") == player(id,"team") then
		killbuildingscount[id] = killbuildingscount[id] + 1
		if killbuildingscount[id] == teambuildinglimit then
			parse("kill "..id)
			killbuildingscount[id] = 0
		end
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht