Forum

> > CS2D > Scripts > Minecraft chest ! [Sloved]
Forums overviewCS2D overview Scripts overviewLog in to reply

English Minecraft chest ! [Sloved]

11 replies
To the start Previous 1 Next To the start

old Minecraft chest ! [Sloved]

Kirito2K
User Off Offline

Quote
Hi all , i have decided to make a minecraft chest lua , any way , i want to know how to make a use tigger in map make a script menu .

Example , if i pressed "E" to open that chest then a menu will just pop up ..

PS : No one made this script so i wanted to do it first !
edited 1×, last 03.12.14 07:22:54 pm

old Re: Minecraft chest ! [Sloved]

Ajmin
User Off Offline

Quote
So simple.
1
2
3
4
5
6
7
8
addhook('usebutton','using')
function using(id,x,y)
if x==(ur x position in map) and y==(vice versa)
--Ur menu--
end 
end

Note:in ur position in map there should be a trigger use attached.

hope i helped.

old Re: Minecraft chest ! [Sloved]

Kirito2K
User Off Offline

Quote
No i didn't mean that , i want it work by the tigger name like :

1
2
3
4
5
addhook('usetiggername','whatever')
function usetiggername(id)
menu ..
end 
end

like that , but i don't know ..

old Re: Minecraft chest ! [Sloved]

Ajmin
User Off Offline

Quote
I really dnt understand ur point of view.

Explain it plse.

ur code really sucks hook shuld nt be implemented as function.

What u actually need open a menu with trigger use or trigger the trigger use with lua?


Edit:
1
2
3
4
5
6
7
8
addhook("usebutton","_pk")
function _pk(id,x,y)
     if entity(x,y,"name") == "ss" then 
          menu(id,"blah,blah")
     elseif entity(x,y,"name") == "pk" then
          menu(id,"blah,blah")
     end
end
edited 1×, last 03.12.14 06:36:26 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview