Forum

> > CS2D > Scripts > flagtake hook issue?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch flagtake hook issue?

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt flagtake hook issue?

Chex
User Off Offline

Zitieren
It's probably just a syntax error, but for some reason I can't make it so that the CT's can't pick up the flag but I can do it for the T's.

1
2
3
4
5
6
addhook("flagtake","flagNoTake")
function flagNoTake(team,x,y)
	if team == 2 then
	    return 1
	end
end

It works fine to stop the T's with this code:

1
2
3
4
5
6
addhook("flagtake","flagNoTake")
function flagNoTake(team,x,y)
	if team == 1 then
	    return 1
	end
end

alt Re: flagtake hook issue?

Apache uwu
User Off Offline

Zitieren
cs2d lua hook flagtake

The correct parameters are id,team,x,y.

1
2
3
4
5
6
addhook("flagtake","flagNoTake")
function flagNoTake(id,team,x,y)
	if team == 2 then
		return 1
	end
end

alt Re: flagtake hook issue?

Chex
User Off Offline

Zitieren
user Apache uwu hat geschrieben
cs2d lua hook flagtake

The correct parameters are id,team,x,y.

1
2
3
4
5
6
addhook("flagtake","flagNoTake")
function flagNoTake(id,team,x,y)
	if team == 2 then
		return 1
	end
end


*facepalm*

I feel super dumb now.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht