Forum

> > CS2D > Maps/Editor > Help me with doors
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English Help me with doors

10 replies
To the start Previous 1 Next To the start

old Re: Help me with doors

Yates
Reviewer Off Offline

Quote
I don't know either but then the person who can, must make a y x (place can be set where you like) but there must be a button there, click the button it cost you money
If only I knew lua..

old Re: Help me with doors

EngiN33R
Moderator Off Offline

Quote
Put a button to open the door for money.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
BUTTONX=1 --write in the button's X position in tiles
BUTTONY=1 --write in the button's Y position in tiles
COST=1000 --write in the amount of money to open the door
DOORNAME="door1" --write in the entity's name IN QUOTES (" - quote)

addhook("use","buydoor")
function buydoor(id)
	if (player(id,"tilex")==BUTTONX and player(id,"tiley")==BUTTONY and player(id,"money")>=COST) then
		parse("trigger "..DOORNAME)
		parse("setmoney "..id.." "..(player(id,"money")-COST))
	else
		msg2(id,"You don't have enough money!")
	end
end

old Re: Help me with doors

Geez
GAME BANNED Off Offline

Quote
zwinky207 has written
Ooh now i understand THX ALOT!! everybody special you Qrchack and EngiN33R!!!


No problem
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview