alejandro762
Well-Known Member
- Joined
- Sep 6, 2021
- Messages
- 225
- Reaction score
- 63
Hello
I would like to know in lua, how can we tell in an 'if' if a player uses (right click) an object (without consuming it) such as, for example, right click open a table > modal windows, so that it detects what is the table it opens and depending on the table, it executes a function.
Let me explain,
I have 1 blue table, and a red table, I would like that if the player clicks on the blue table, after create an object ( craft ) he has for example 100 coins, and if he clicks on the red table he has 200 coins.
I saw an isInArray function (also many others, if target.getId(), etc ).
I don't really know how we could write that, and of course if it exists.
I would like to know in lua, how can we tell in an 'if' if a player uses (right click) an object (without consuming it) such as, for example, right click open a table > modal windows, so that it detects what is the table it opens and depending on the table, it executes a function.
Let me explain,
I have 1 blue table, and a red table, I would like that if the player clicks on the blue table, after create an object ( craft ) he has for example 100 coins, and if he clicks on the red table he has 200 coins.
I saw an isInArray function (also many others, if target.getId(), etc ).
I don't really know how we could write that, and of course if it exists.