Forum

> > CS2D > Scripts > Where is my mistake?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Where is my mistake?

4 replies
To the start Previous 1 Next To the start

old Re: Where is my mistake?

Rainoth
Moderator Off Offline

Quote
Allow me to explain.

Build hook refers to building already being in the process of making while the buildattempt hook is before making it. Therefore you can't place e.g. triple turret on the spot where simple turret is already being made. I might be wrong but this is my guess.

old Re: Where is my mistake?

limonata
User Off Offline

Quote
Thanks for your comment but i need solutions not explains because english isnt my main language so im not perfect at it. I need just a fix. Thanks anyway.

old Re: Where is my mistake?

KagamineLen
User Off Offline

Quote
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
31
addhook("build","Building")
function Building(id,type)
		if (type == 21) then
		return 0
	else
		return 1
	end
end

buildingmoney = {300,500,1000,2000,3000,1500,5000,3000}

addhook("build","Building2")
function Building2(id,type,x,y)
		if (type == 21) then
		return 0
	else
		parse("spawnobject "..type.." "..x.." "..y.." 90 1 "..player(id,"team").." "..id)
	end
end
		parse("mp_startmoney 16000")
		parse('mp_building_limit "Barricade" 40')
		parse('mp_building_limit "Barbed Wire" 40')
		parse('mp_building_limit "Wall I" 40')
		parse('mp_building_limit "Wall II" 40')
		parse('mp_building_limit "Wall III" 40')
		parse('mp_building_limit "Gate Field" 25')
		parse('mp_building_limit "Turret" 15')
		parse('mp_building_limit "Dispenser" 3')
		parse('mp_building_limit "Supply" 3')
		parse('mp_building_limit "Teleporter Entrance" 2')
		parse('mp_building_limit "Teleporter Exit" 1')

this is the script i used on my fast build
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview