Forum

> > CS2D > Scripts > Shop script area
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Shop script area

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Shop script area

maninja
User Off Offline

Zitieren
Hello guys

Welcome again I need something I will explain now
Explain stage : You know what i mean When you read title,
I need to lua shop x and y not function prees , i want area of that , if you go to that position just you need prees ~E~ and will get hud image of that ,

I think you understood what I meant in this case if someone help me, thank you very much for that

alt Re: Shop script area

Bowlinghead
User Off Offline

Zitieren
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
-- untested
-- "Shop script area"
shopCenterTileX = 5
shopCenterTileY = 5
shopCenterTileRadius = 3

function isInShop(tx,ty) -- "I need to lua shop x and y not function prees"
	local dx = tx - shopCenterTileX
	local dy = ty - shopCenterTileY
	if (math.sqrt(dx*dx + dy*dy) <= shopCenterTileRadius) then
		return true
	else
		return false
	end
end


-- "Welcome again I need something I will explain now "
addhook("use", "maney")
function maney(id)
	if (isInShop(player(id,"tilex"),player(id,"tiley")) then
		-- msg2(id,"You entered the shop") just debug lol
		menu(id,"Kill Yourself, Yes, No") -- You know what i mean When you read title
		parse("hudtxt 13 'That' 200 200") -- "and will get hud image of that" 
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht