Can someone help me?
Forum
CS2D Scripts script requestscript request
7 replies 1
Can someone help me?
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("buildattempt","a") function a(id,type,x,y) 	if type == 7 then 	parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id) 	return 1 	end end
EP has written works
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("buildattempt","a") function a(id,type,x,y) 	if type == 7 then 	parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id) 	return 1 	end end
Thank you , it works
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("buildattempt","a") function a(id,type,x,y) 	if player(id,"weapontype")==74 then parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id) return 1 	end end
For all buildings except objects like mines
If you want use it for all OBJECTS (mines,laser mines), just use:
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("buildattempt","a") function a(id,type,x,y) parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id) return 1 end
1