Forum

> > CS2D > Scripts > Area position
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Area position

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Area position

maninja
User Off Offline

Zitieren
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

alt Re: Area position

Avo
User Off Offline

Zitieren
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.

alt Re: Area position

KingShadow
User Off Offline

Zitieren
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??

alt Re: Area position

Rygna
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht