I used to be decent at lua, and the basic gist is that I want X team to win when they get their flag to Y team's flag point, even if the flag isn't there. HALP!
Forum
CS2D Scripts Simple ctf mod request.Simple ctf mod request.
2 replies 1
I used to be decent at lua, and the basic gist is that I want X team to win when they get their flag to Y team's flag point, even if the flag isn't there. HALP!
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("movetile","CapFlag") function CapFlag(id,tilex,tiley) 	if(player(id,"flag") == true) then 		if(entity(tilex,tiley,"type") == 15) then 			if(entity(tilex,tiley,"var0") ~= player(id,"team")) then 				parse("sv_restart 0"); 			end 		end 	end end
Ok, this works if you want to take your enemy's flag to your enemy's base, I might fix it to go either way later.
edited 4×, last 26.03.12 12:34:14 am
1
if(player(id,"flag") == true) then
1
if player(id,"flag") then
1