Forum

> > CS2D > Scripts > flagtake hook issue?
Forums overviewCS2D overview Scripts overviewLog in to reply

English flagtake hook issue?

2 replies
To the start Previous 1 Next To the start

old flagtake hook issue?

Chex
User Off Offline

Quote
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

old Re: flagtake hook issue?

Apache uwu
User Off Offline

Quote
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

old Re: flagtake hook issue?

Chex
User Off Offline

Quote
user Apache uwu has written
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.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview