Forum

> > CS2D > Scripts > Area position
Forums overviewCS2D overview Scripts overviewLog in to reply

English Area position

5 replies
To the start Previous 1 Next To the start

old Area position

maninja
User Off Offline

Quote
Hi guys welcome everybody,

I need some help please I need the area i lua but position i dont add it
1
2
3
4
5
6
7
8
addhook('movetile','movetile_hook')
function movetile_hook(id,x,y)
if player(id,'tilex') == tilex and player(id,'tiley') == tiley then --
parse('hudtxt2 '..id..' 2 "\169000128255[Area]:\169255255255 CAR SHOP " 9 126 0')
else
parse('hudtxt2 '..id..' 2 "\169000128255[Area]:\169255255255 CITY " 9 126 0')
end
end

pls hellp me and thx so much

old Re: Area position

Avo
User Off Offline

Quote
if player(id,'tilex') == tilex and player(id,'tiley') == tiley then

tilex
and
tiley
are coordinates, so change them to any numbers you want:
if player(id,'tilex') == 20 and player(id,'tiley') == 18 then

Btw, you didn't have to make another thread, since you created thread trash Area position.

old Re: Area position

KingShadow
User Off Offline

Quote
you made 2 threads about that just cause you dont know how to change the coordinates
i told you to change it before you use it in your script

you can find tilex and tiley in map editor down of the screen
you will find x | y take the first number and replace it with
1
tilex
and the second number replace it with
1
tiley

is it hard to understand??

old Re: Area position

Rygna
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
addhook('movetile', 'movetile_hook')
function movetile_hook(id, x, y)
	local x1 = 10 -- change this.
	local y1 = 10 -- dis tho.

	if player(id, 'tilex') == x1 and player(id, 'tiley') == y1 then
		parse('hudtxt2 '..id..' 2 "\169000128255[Area]:\169255255255 CAR SHOP " 9 126 0')
	else
		parse('hudtxt2 '..id..' 2 "\169000128255[Area]:\169255255255 CITY " 9 126 0')
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview