English Shop script area

1 reply
Goto Page
To the start Previous 1 Next To the start
05.01.19 09:25:44 pm
Up
Hazard_h
User
Offline Off
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
05.01.19 10:37:07 pm
Up
Bowlinghead
User
Offline Off
Code:
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
Share time limited free games here
To the start Previous 1 Next To the start